Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Login() not saving UserPK
Message
General information
Forum:
ASP.NET
Category:
The Mere Mortals .NET Framework
Title:
Login() not saving UserPK
Environment versions
Environment:
C# 1.1
OS:
Windows XP SP2
Network:
Windows 2003 Server
Database:
MS SQL Server
Miscellaneous
Thread ID:
01030777
Message ID:
01030777
Views:
72
Here is the code snippet from the mmBaseUserLogin.aspx.cs file for the Login() method. It appears to me the since a local instance of the User object is being created and used to authenticate the user that the user info, such as the UserPK member is only being saved to the local instance of User and not to the mmAppBase.UserMgr.UserPK. But the mmAppBase.UserMgr.UserPK is what is being passed into the HookUserAuthenticated() method and in my case it is an undefined value, even though it is defined in the local instance of User. Is this an oversight, or did I screw something else up somewhere? That is a possibility since I subclassed the mmUserManager and have my own version of it.
protected bool Login() 
		{
			mmUserManager User = mmAppBase.Factory.CreateUserManager();
			if (User.AuthenticateUser(this.Username,this.Password, 
				mmAppBase.DatabaseMgr.GetSecurityDatabaseKey()) ) 
			{
				// Set the value up here
				Session["mmUserSecurity_UserPk"]=User.UserPK;

				// *** Simply exit here now which forces page to reload as is
				// *** and then redirect to the source page

				Session.Remove("mmUserSecurity_RedirectionUrl");

				// If a Language PK is specified, save it to the mmCurrentLanguage session variable
				if (User.CurrentLanguage != null)
				{
					Session["mmCurrentLanguage"] = User.CurrentLanguage;
				}

				// Call the HookUserAuthenticated method
				this.HookUserAuthenticated(mmAppBase.UserMgr.UserPK);
Next
Reply
Map
View

Click here to load this message in the networking platform