kentico_michal
-
8/26/2011 10:02:28 AM
RE:where is the cmscontext user object set
Hello,
I would suggest using the Login1_LoggedIn handler of Logon form web part (~\CMSWebParts\Membership\Logon\LogonForm.ascx.cs). This event is fired after successful login.
However, the CMSContext.CurrentUser is not initialized so you will need to manually access the UserInfo object by using UserInfoProvider.GetFullUserInfo method and the username from Login control:
// Current username string userName = Login1.UserName; UserInfo user = UserInfoProvider.GetFullUserInfo(userName);
Best regards, Michal Legen
|