Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Login() not saving UserPK
Message
Information générale
Forum:
ASP.NET
Catégorie:
The Mere Mortals .NET Framework
Titre:
Login() not saving UserPK
Versions des environnements
Environment:
C# 1.1
OS:
Windows XP SP2
Network:
Windows 2003 Server
Database:
MS SQL Server
Divers
Thread ID:
01030777
Message ID:
01030777
Vues:
71
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);
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform