Try our conversational search powered by Generative AI!

Retrieve logged in user is null



I am trying to login a valid user and then retrieve the users information, but gets null value according to the code below:


IUser user; 

SecurityHandler.Instance.AuthenticateUser(LoginUnameBox.Text, LoginPasswBox.Text, out user); //user is ok with correct data

user = CommunitySystem.CurrentContext.DefaultSecurity.CurrentUser;  <----------- Current user is null.

May 24, 2011 10:23

I think you have to set the auth cookie and possibly refresh the page for it to work. If you use the aspnet Login control at least the first part will be handled automatically.

May 24, 2011 12:48
This thread is locked and should be used for reference only. Please use the Legacy add-ons forum to open new discussions.
* You are NOT allowed to include any hyperlinks in the post because your account hasn't associated to your company. User profile should be updated.