diff options
Diffstat (limited to 'OpenSim/Framework/Communications/CommunicationsManager.cs')
-rw-r--r-- | OpenSim/Framework/Communications/CommunicationsManager.cs | 63 |
1 files changed, 5 insertions, 58 deletions
diff --git a/OpenSim/Framework/Communications/CommunicationsManager.cs b/OpenSim/Framework/Communications/CommunicationsManager.cs index bcf9bed..a5ead3f 100644 --- a/OpenSim/Framework/Communications/CommunicationsManager.cs +++ b/OpenSim/Framework/Communications/CommunicationsManager.cs | |||
@@ -106,8 +106,12 @@ namespace OpenSim.Framework.Communications | |||
106 | protected NetworkServersInfo m_networkServersInfo; | 106 | protected NetworkServersInfo m_networkServersInfo; |
107 | 107 | ||
108 | /// <summary> | 108 | /// <summary> |
109 | /// Interface to administrative user service calls. | 109 | /// Interface to user service for administrating users. |
110 | /// </summary> | 110 | /// </summary> |
111 | public IUserServiceAdmin UserServiceAdmin | ||
112 | { | ||
113 | get { return m_userServiceAdmin; } | ||
114 | } | ||
111 | protected IUserServiceAdmin m_userServiceAdmin; | 115 | protected IUserServiceAdmin m_userServiceAdmin; |
112 | 116 | ||
113 | public BaseHttpServer HttpServer | 117 | public BaseHttpServer HttpServer |
@@ -247,63 +251,6 @@ namespace OpenSim.Framework.Communications | |||
247 | } | 251 | } |
248 | 252 | ||
249 | #endregion | 253 | #endregion |
250 | |||
251 | /// <summary> | ||
252 | /// Persistently adds a user to OpenSim. | ||
253 | /// </summary> | ||
254 | /// <param name="firstName"></param> | ||
255 | /// <param name="lastName"></param> | ||
256 | /// <param name="password"></param> | ||
257 | /// <param name="email"></param> | ||
258 | /// <param name="regX"></param> | ||
259 | /// <param name="regY"></param> | ||
260 | /// <returns>The UUID of the added user. Returns UUID.Zero if the add was unsuccessful</returns> | ||
261 | public UUID AddUser(string firstName, string lastName, string password, string email, uint regX, uint regY) | ||
262 | { | ||
263 | string md5PasswdHash = Util.Md5Hash(Util.Md5Hash(password) + ":" + String.Empty); | ||
264 | |||
265 | m_userServiceAdmin.AddUserProfile(firstName, lastName, md5PasswdHash, email, regX, regY); | ||
266 | UserProfileData userProf = UserService.GetUserProfile(firstName, lastName); | ||
267 | if (userProf == null) | ||
268 | { | ||
269 | return UUID.Zero; | ||
270 | } | ||
271 | else | ||
272 | { | ||
273 | InterServiceInventoryService.CreateNewUserInventory(userProf.ID); | ||
274 | m_log.Info("[USERS]: Created new inventory set for " + firstName + " " + lastName); | ||
275 | return userProf.ID; | ||
276 | } | ||
277 | } | ||
278 | |||
279 | /// <summary> | ||
280 | /// Adds the user. | ||
281 | /// </summary> | ||
282 | /// <param name="firstName">The first name.</param> | ||
283 | /// <param name="lastName">The last name.</param> | ||
284 | /// <param name="password">The password.</param> | ||
285 | /// <param name="email">The email.</param> | ||
286 | /// <param name="regX">The reg X.</param> | ||
287 | /// <param name="regY">The reg Y.</param> | ||
288 | /// <param name="SetUUID">The set UUID.</param> | ||
289 | /// <returns></returns> | ||
290 | public UUID AddUser(string firstName, string lastName, string password, string email, uint regX, uint regY, UUID SetUUID) | ||
291 | { | ||
292 | string md5PasswdHash = Util.Md5Hash(Util.Md5Hash(password) + ":" + String.Empty); | ||
293 | |||
294 | m_userServiceAdmin.AddUserProfile(firstName, lastName, md5PasswdHash, email, regX, regY, SetUUID); | ||
295 | UserProfileData userProf = UserService.GetUserProfile(firstName, lastName); | ||
296 | if (userProf == null) | ||
297 | { | ||
298 | return UUID.Zero; | ||
299 | } | ||
300 | else | ||
301 | { | ||
302 | InterServiceInventoryService.CreateNewUserInventory(userProf.ID); | ||
303 | m_log.Info("[USERS]: Created new inventory set for " + firstName + " " + lastName); | ||
304 | return userProf.ID; | ||
305 | } | ||
306 | } | ||
307 | 254 | ||
308 | /// <summary> | 255 | /// <summary> |
309 | /// Reset a user password | 256 | /// Reset a user password |