aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Framework/Communications/UserManagerBase.cs
diff options
context:
space:
mode:
authorJustin Clarke Casey2008-09-15 17:29:11 +0000
committerJustin Clarke Casey2008-09-15 17:29:11 +0000
commit6d289c3ae00b8d0f745d3345e8148b8d39b5206f (patch)
tree0a2f99813573fa61936202a2949532ac1f1685a1 /OpenSim/Framework/Communications/UserManagerBase.cs
parentAdd the option to use Allow_osFunction = false for each OS function (diff)
downloadopensim-SC_OLD-6d289c3ae00b8d0f745d3345e8148b8d39b5206f.zip
opensim-SC_OLD-6d289c3ae00b8d0f745d3345e8148b8d39b5206f.tar.gz
opensim-SC_OLD-6d289c3ae00b8d0f745d3345e8148b8d39b5206f.tar.bz2
opensim-SC_OLD-6d289c3ae00b8d0f745d3345e8148b8d39b5206f.tar.xz
* Add "reset user password" command to standalone region console
* Grid user server implementation to follow shortly
Diffstat (limited to 'OpenSim/Framework/Communications/UserManagerBase.cs')
-rw-r--r--OpenSim/Framework/Communications/UserManagerBase.cs29
1 files changed, 27 insertions, 2 deletions
diff --git a/OpenSim/Framework/Communications/UserManagerBase.cs b/OpenSim/Framework/Communications/UserManagerBase.cs
index 75c4dc1..4fc2fea 100644
--- a/OpenSim/Framework/Communications/UserManagerBase.cs
+++ b/OpenSim/Framework/Communications/UserManagerBase.cs
@@ -361,8 +361,6 @@ namespace OpenSim.Framework.Communications
361 /// <param name="request">The users loginrequest</param> 361 /// <param name="request">The users loginrequest</param>
362 public void CreateAgent(UserProfileData profile, XmlRpcRequest request) 362 public void CreateAgent(UserProfileData profile, XmlRpcRequest request)
363 { 363 {
364 Hashtable requestData = (Hashtable) request.Params[0];
365
366 UserAgentData agent = new UserAgentData(); 364 UserAgentData agent = new UserAgentData();
367 365
368 // User connection 366 // User connection
@@ -574,6 +572,33 @@ namespace OpenSim.Framework.Communications
574 572
575 return user.ID; 573 return user.ID;
576 } 574 }
575
576 /// <summary>
577 /// Reset a user password
578 /// </summary>
579 /// <param name="firstName"></param>
580 /// <param name="lastName"></param>
581 /// <param name="newPassword"></param>
582 /// <returns>true if the update was successful, false otherwise</returns>
583 public bool ResetUserPassword(string firstName, string lastName, string newPassword)
584 {
585 string md5PasswdHash = Util.Md5Hash(Util.Md5Hash(newPassword) + ":" + String.Empty);
586
587 UserProfileData profile = GetUserProfile(firstName, lastName);
588
589 if (null == profile)
590 {
591 m_log.ErrorFormat("[USERSTORAGE]: Could not find user {0} {1}", firstName, lastName);
592 return false;
593 }
594
595 profile.PasswordHash = md5PasswdHash;
596 profile.PasswordSalt = String.Empty;
597
598 UpdateUserProfile(profile);
599
600 return true;
601 }
577 602
578 public bool UpdateUserProfileProperties(UserProfileData UserProfile) 603 public bool UpdateUserProfileProperties(UserProfileData UserProfile)
579 { 604 {