diff options
author | Justin Clarke Casey | 2008-02-18 15:50:18 +0000 |
---|---|---|
committer | Justin Clarke Casey | 2008-02-18 15:50:18 +0000 |
commit | 500d259c252f8c4f75c6f37e1067d57811426ddd (patch) | |
tree | 778ae131f7fdb01678f82cf8b94a25992e722390 /OpenSim/Framework/Communications/UserManagerBase.cs | |
parent | a new attempt at converting to the right types (diff) | |
download | opensim-SC-500d259c252f8c4f75c6f37e1067d57811426ddd.zip opensim-SC-500d259c252f8c4f75c6f37e1067d57811426ddd.tar.gz opensim-SC-500d259c252f8c4f75c6f37e1067d57811426ddd.tar.bz2 opensim-SC-500d259c252f8c4f75c6f37e1067d57811426ddd.tar.xz |
* Do not allow a user to be created if one with the same name already exists
Diffstat (limited to '')
-rw-r--r-- | OpenSim/Framework/Communications/UserManagerBase.cs | 45 |
1 files changed, 18 insertions, 27 deletions
diff --git a/OpenSim/Framework/Communications/UserManagerBase.cs b/OpenSim/Framework/Communications/UserManagerBase.cs index dbf9276..733d62b 100644 --- a/OpenSim/Framework/Communications/UserManagerBase.cs +++ b/OpenSim/Framework/Communications/UserManagerBase.cs | |||
@@ -86,11 +86,24 @@ namespace OpenSim.Framework.UserManagement | |||
86 | 86 | ||
87 | #region Get UserProfile | 87 | #region Get UserProfile |
88 | 88 | ||
89 | /// <summary> | 89 | // see IUserService |
90 | /// Loads a user profile from a database by UUID | 90 | public UserProfileData GetUserProfile(string fname, string lname) |
91 | /// </summary> | 91 | { |
92 | /// <param name="uuid">The target UUID</param> | 92 | foreach (KeyValuePair<string, IUserData> plugin in _plugins) |
93 | /// <returns>A user profile. Returns null if no user profile is found.</returns> | 93 | { |
94 | UserProfileData profile = plugin.Value.GetUserByName(fname, lname); | ||
95 | |||
96 | if (profile != null) | ||
97 | { | ||
98 | profile.currentAgent = getUserAgent(profile.UUID); | ||
99 | return profile; | ||
100 | } | ||
101 | } | ||
102 | |||
103 | return null; | ||
104 | } | ||
105 | |||
106 | // see IUserService | ||
94 | public UserProfileData GetUserProfile(LLUUID uuid) | 107 | public UserProfileData GetUserProfile(LLUUID uuid) |
95 | { | 108 | { |
96 | foreach (KeyValuePair<string, IUserData> plugin in _plugins) | 109 | foreach (KeyValuePair<string, IUserData> plugin in _plugins) |
@@ -126,28 +139,6 @@ namespace OpenSim.Framework.UserManagement | |||
126 | } | 139 | } |
127 | 140 | ||
128 | /// <summary> | 141 | /// <summary> |
129 | /// Loads a user profile by name | ||
130 | /// </summary> | ||
131 | /// <param name="fname">First name</param> | ||
132 | /// <param name="lname">Last name</param> | ||
133 | /// <returns>A user profile. Returns null if no profile is found</returns> | ||
134 | public UserProfileData GetUserProfile(string fname, string lname) | ||
135 | { | ||
136 | foreach (KeyValuePair<string, IUserData> plugin in _plugins) | ||
137 | { | ||
138 | UserProfileData profile = plugin.Value.GetUserByName(fname, lname); | ||
139 | |||
140 | if (profile != null) | ||
141 | { | ||
142 | profile.currentAgent = getUserAgent(profile.UUID); | ||
143 | return profile; | ||
144 | } | ||
145 | } | ||
146 | |||
147 | return null; | ||
148 | } | ||
149 | |||
150 | /// <summary> | ||
151 | /// Set's user profile from object | 142 | /// Set's user profile from object |
152 | /// </summary> | 143 | /// </summary> |
153 | /// <param name="fname">First name</param> | 144 | /// <param name="fname">First name</param> |