diff options
Diffstat (limited to 'OpenSim.Framework/UserProfileManagerBase.cs')
-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 | } |