diff options
author | MW | 2007-03-28 18:10:52 +0000 |
---|---|---|
committer | MW | 2007-03-28 18:10:52 +0000 |
commit | 35fa85069e792579ebd44a974053d6dce288ea0a (patch) | |
tree | 8a5629c4f5e0a51e20a05123c4b1b9ea9f49f61e /OpenSim.Framework/UserProfileManagerBase.cs | |
parent | * log file name conflict (diff) | |
download | opensim-SC-35fa85069e792579ebd44a974053d6dce288ea0a.zip opensim-SC-35fa85069e792579ebd44a974053d6dce288ea0a.tar.gz opensim-SC-35fa85069e792579ebd44a974053d6dce288ea0a.tar.bz2 opensim-SC-35fa85069e792579ebd44a974053d6dce288ea0a.tar.xz |
After hours of searching for a bug, it works - User accounts in sandbox mode, currently they are not persistent between restarts (ie restarting opensim.exe) but should be persistent between sessions (login/ logout).
Use the -account command line arg to enable them and then create new accounts through the web interface
Diffstat (limited to '')
-rw-r--r-- | OpenSim.Framework/UserProfileManagerBase.cs | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/OpenSim.Framework/UserProfileManagerBase.cs b/OpenSim.Framework/UserProfileManagerBase.cs index ad03bc2..218a98c 100644 --- a/OpenSim.Framework/UserProfileManagerBase.cs +++ b/OpenSim.Framework/UserProfileManagerBase.cs | |||
@@ -41,19 +41,23 @@ namespace OpenSim.Framework.User | |||
41 | public virtual bool AuthenticateUser(string firstname, string lastname, string passwd) | 41 | public virtual bool AuthenticateUser(string firstname, string lastname, string passwd) |
42 | { | 42 | { |
43 | UserProfile TheUser = GetProfileByName(firstname, lastname); | 43 | UserProfile TheUser = GetProfileByName(firstname, lastname); |
44 | passwd = passwd.Remove(0, 3); //remove $1$ | ||
44 | if (TheUser != null) | 45 | if (TheUser != null) |
45 | { | 46 | { |
46 | if (TheUser.MD5passwd == passwd) | 47 | if (TheUser.MD5passwd == passwd) |
47 | { | 48 | { |
49 | Console.WriteLine("UserProfile - authorised "); | ||
48 | return true; | 50 | return true; |
49 | } | 51 | } |
50 | else | 52 | else |
51 | { | 53 | { |
54 | Console.WriteLine("UserProfile - not authorised, password not match "+ TheUser.MD5passwd +" and "+ passwd); | ||
52 | return false; | 55 | return false; |
53 | } | 56 | } |
54 | } | 57 | } |
55 | else | 58 | else |
56 | { | 59 | { |
60 | Console.WriteLine("UserProfile - not authorised , unkown: "+ firstname +" , " + lastname); | ||
57 | return false; | 61 | return false; |
58 | } | 62 | } |
59 | 63 | ||
@@ -66,12 +70,14 @@ namespace OpenSim.Framework.User | |||
66 | 70 | ||
67 | public virtual UserProfile CreateNewProfile(string firstname, string lastname, string MD5passwd) | 71 | public virtual UserProfile CreateNewProfile(string firstname, string lastname, string MD5passwd) |
68 | { | 72 | { |
73 | Console.WriteLine("creating new profile for : " + firstname + " , " + lastname); | ||
69 | UserProfile newprofile = new UserProfile(); | 74 | UserProfile newprofile = new UserProfile(); |
70 | newprofile.homeregionhandle = Helpers.UIntsToLong((997 * 256), (996 * 256)); | 75 | newprofile.homeregionhandle = Helpers.UIntsToLong((997 * 256), (996 * 256)); |
71 | newprofile.firstname = firstname; | 76 | newprofile.firstname = firstname; |
72 | newprofile.lastname = lastname; | 77 | newprofile.lastname = lastname; |
73 | newprofile.MD5passwd = MD5passwd; | 78 | newprofile.MD5passwd = MD5passwd; |
74 | newprofile.UUID = LLUUID.Random(); | 79 | newprofile.UUID = LLUUID.Random(); |
80 | newprofile.Inventory.CreateRootFolder(newprofile.UUID, true); | ||
75 | this.UserProfiles.Add(newprofile.UUID, newprofile); | 81 | this.UserProfiles.Add(newprofile.UUID, newprofile); |
76 | return newprofile; | 82 | return newprofile; |
77 | } | 83 | } |