aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Framework/Communications/UserManagerBase.cs
diff options
context:
space:
mode:
authorMelanie2009-10-01 14:08:15 +0100
committerMelanie2009-10-01 14:08:15 +0100
commit41ff39414bc70ef645e2180693792c83d61a7539 (patch)
treedc711428d4c8fed07791263ff4dfea142d54e4e7 /OpenSim/Framework/Communications/UserManagerBase.cs
parentMerge branch 'vehicles' of ssh://opensim@tor.k-grid.com/home/opensim/opensim ... (diff)
parent- adding new LandDataSerializer testcase to "test-xml" target as well (diff)
downloadopensim-SC_OLD-41ff39414bc70ef645e2180693792c83d61a7539.zip
opensim-SC_OLD-41ff39414bc70ef645e2180693792c83d61a7539.tar.gz
opensim-SC_OLD-41ff39414bc70ef645e2180693792c83d61a7539.tar.bz2
opensim-SC_OLD-41ff39414bc70ef645e2180693792c83d61a7539.tar.xz
Merge branch 'master' into vehicles
Diffstat (limited to 'OpenSim/Framework/Communications/UserManagerBase.cs')
-rw-r--r--OpenSim/Framework/Communications/UserManagerBase.cs14
1 files changed, 8 insertions, 6 deletions
diff --git a/OpenSim/Framework/Communications/UserManagerBase.cs b/OpenSim/Framework/Communications/UserManagerBase.cs
index 1abd733..bf4f331 100644
--- a/OpenSim/Framework/Communications/UserManagerBase.cs
+++ b/OpenSim/Framework/Communications/UserManagerBase.cs
@@ -94,9 +94,9 @@ namespace OpenSim.Framework.Communications
94 public void AddPlugin(string provider, string connect) 94 public void AddPlugin(string provider, string connect)
95 { 95 {
96 m_plugins.AddRange(DataPluginFactory.LoadDataPlugins<IUserDataPlugin>(provider, connect)); 96 m_plugins.AddRange(DataPluginFactory.LoadDataPlugins<IUserDataPlugin>(provider, connect));
97 } 97 }
98 98
99 #region UserProfile 99 #region UserProfile
100 100
101 public virtual void AddTemporaryUserProfile(UserProfileData userProfile) 101 public virtual void AddTemporaryUserProfile(UserProfileData userProfile)
102 { 102 {
@@ -650,15 +650,17 @@ namespace OpenSim.Framework.Communications
650 public virtual UUID AddUser( 650 public virtual UUID AddUser(
651 string firstName, string lastName, string password, string email, uint regX, uint regY, UUID SetUUID) 651 string firstName, string lastName, string password, string email, uint regX, uint regY, UUID SetUUID)
652 { 652 {
653 string md5PasswdHash = Util.Md5Hash(Util.Md5Hash(password) + ":" + String.Empty);
654 653
655 UserProfileData user = new UserProfileData(); 654 UserProfileData user = new UserProfileData();
655
656 user.PasswordSalt = Util.Md5Hash(UUID.Random().ToString());
657 string md5PasswdHash = Util.Md5Hash(Util.Md5Hash(password) + ":" + user.PasswordSalt);
658
656 user.HomeLocation = new Vector3(128, 128, 100); 659 user.HomeLocation = new Vector3(128, 128, 100);
657 user.ID = SetUUID; 660 user.ID = SetUUID;
658 user.FirstName = firstName; 661 user.FirstName = firstName;
659 user.SurName = lastName; 662 user.SurName = lastName;
660 user.PasswordHash = md5PasswdHash; 663 user.PasswordHash = md5PasswdHash;
661 user.PasswordSalt = String.Empty;
662 user.Created = Util.UnixTimeSinceEpoch(); 664 user.Created = Util.UnixTimeSinceEpoch();
663 user.HomeLookAt = new Vector3(100, 100, 100); 665 user.HomeLookAt = new Vector3(100, 100, 100);
664 user.HomeRegionX = regX; 666 user.HomeRegionX = regX;
@@ -922,8 +924,8 @@ namespace OpenSim.Framework.Communications
922 if (md5PasswordHash == userProfile.PasswordHash) 924 if (md5PasswordHash == userProfile.PasswordHash)
923 return true; 925 return true;
924 else 926 else
925 return false; 927 return false;
926 } 928 }
927 929
928 #endregion 930 #endregion
929 } 931 }