After Register automatically user get logged In

anand kamane asked on July 6, 2018 12:58

I created register form in my website.After registration of user I want to immediate login(dont want to show login screen).For that I configured all the thing in admin like unchecked Registration requires email confirmation and Registration requires administrator's approval this also unchecked.from c# code i made user enabled.But after registration its again redirecting to login page only.

Note:After Register I redirecting Thank you page and Its page security property require authentication is No.

Recent Answers


samira mirza answered on July 6, 2018 14:09

For getting this behavior you need to modify your webpart cs file and add the code to login the user.

0 votesVote for this answer Mark as a Correct answer

anand kamane answered on July 6, 2018 14:30

@samira mirza Thanks for your time.I wrote i.e.AuthenticationHelper.AuthenticateUser(updateUser.UserName, true); this code for making user as authenticated.but its not working.

0 votesVote for this answer Mark as a Correct answer

samira mirza answered on July 6, 2018 14:39

try this http://devnet.kentico.com/docs/10_0/api/html/M_CMS_Membership_AuthenticationHelper_AuthenticateUser_1.htm

0 votesVote for this answer Mark as a Correct answer

vasu yerramsetti answered on July 7, 2018 18:36

Hi Anand

Why cannot you use out of the box "Custom Registration Form" web part? You can achieve your requirement using above web part and check implementation of code for this Web part.

0 votesVote for this answer Mark as a Correct answer

   Please, sign in to be able to submit a new answer.