diff options
Diffstat (limited to '')
-rw-r--r-- | OpenSim/Framework/UserManager/UserManagerBase.cs | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/OpenSim/Framework/UserManager/UserManagerBase.cs b/OpenSim/Framework/UserManager/UserManagerBase.cs index bc923b6..61b5df4 100644 --- a/OpenSim/Framework/UserManager/UserManagerBase.cs +++ b/OpenSim/Framework/UserManager/UserManagerBase.cs | |||
@@ -155,6 +155,28 @@ namespace OpenSim.Framework.UserManagement | |||
155 | 155 | ||
156 | return null; | 156 | return null; |
157 | } | 157 | } |
158 | |||
159 | /// <summary> | ||
160 | /// Set's user profile from object | ||
161 | /// </summary> | ||
162 | /// <param name="fname">First name</param> | ||
163 | /// <param name="lname">Last name</param> | ||
164 | /// <returns>A user profile</returns> | ||
165 | public bool setUserProfile(UserProfileData data) | ||
166 | { | ||
167 | foreach (KeyValuePair<string, IUserData> plugin in _plugins) | ||
168 | { | ||
169 | try { | ||
170 | plugin.Value.updateUserProfile(data); | ||
171 | return true; | ||
172 | } catch (Exception e) { | ||
173 | MainLog.Instance.Verbose( "Unable to set user via " + plugin.Key + "(" + e.ToString() + ")"); | ||
174 | } | ||
175 | } | ||
176 | |||
177 | return false; | ||
178 | } | ||
179 | |||
158 | #endregion | 180 | #endregion |
159 | 181 | ||
160 | #region Get UserAgent | 182 | #region Get UserAgent |
@@ -202,6 +224,15 @@ namespace OpenSim.Framework.UserManagement | |||
202 | return null; | 224 | return null; |
203 | } | 225 | } |
204 | 226 | ||
227 | // TODO: document | ||
228 | public void clearUserAgent(LLUUID agentID) | ||
229 | { | ||
230 | UserProfileData profile = getUserProfile(agentID); | ||
231 | profile.currentAgent = null; | ||
232 | setUserProfile(profile); | ||
233 | } | ||
234 | |||
235 | |||
205 | /// <summary> | 236 | /// <summary> |
206 | /// Loads a user agent by name (not called directly) | 237 | /// Loads a user agent by name (not called directly) |
207 | /// </summary> | 238 | /// </summary> |