From 0862627b341641ec0223bb4191dfee8d85724c9e Mon Sep 17 00:00:00 2001 From: Justin Clarke Casey Date: Fri, 28 Nov 2008 15:34:30 +0000 Subject: * refactor: move CreateUser into UserServiceAdmin --- .../Communications/CommunicationsManager.cs | 63 ++-------------------- 1 file changed, 5 insertions(+), 58 deletions(-) (limited to 'OpenSim/Framework/Communications/CommunicationsManager.cs') 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 protected NetworkServersInfo m_networkServersInfo; /// - /// Interface to administrative user service calls. + /// Interface to user service for administrating users. /// + public IUserServiceAdmin UserServiceAdmin + { + get { return m_userServiceAdmin; } + } protected IUserServiceAdmin m_userServiceAdmin; public BaseHttpServer HttpServer @@ -247,63 +251,6 @@ namespace OpenSim.Framework.Communications } #endregion - - /// - /// Persistently adds a user to OpenSim. - /// - /// - /// - /// - /// - /// - /// - /// The UUID of the added user. Returns UUID.Zero if the add was unsuccessful - public UUID AddUser(string firstName, string lastName, string password, string email, uint regX, uint regY) - { - string md5PasswdHash = Util.Md5Hash(Util.Md5Hash(password) + ":" + String.Empty); - - m_userServiceAdmin.AddUserProfile(firstName, lastName, md5PasswdHash, email, regX, regY); - UserProfileData userProf = UserService.GetUserProfile(firstName, lastName); - if (userProf == null) - { - return UUID.Zero; - } - else - { - InterServiceInventoryService.CreateNewUserInventory(userProf.ID); - m_log.Info("[USERS]: Created new inventory set for " + firstName + " " + lastName); - return userProf.ID; - } - } - - /// - /// Adds the user. - /// - /// The first name. - /// The last name. - /// The password. - /// The email. - /// The reg X. - /// The reg Y. - /// The set UUID. - /// - public UUID AddUser(string firstName, string lastName, string password, string email, uint regX, uint regY, UUID SetUUID) - { - string md5PasswdHash = Util.Md5Hash(Util.Md5Hash(password) + ":" + String.Empty); - - m_userServiceAdmin.AddUserProfile(firstName, lastName, md5PasswdHash, email, regX, regY, SetUUID); - UserProfileData userProf = UserService.GetUserProfile(firstName, lastName); - if (userProf == null) - { - return UUID.Zero; - } - else - { - InterServiceInventoryService.CreateNewUserInventory(userProf.ID); - m_log.Info("[USERS]: Created new inventory set for " + firstName + " " + lastName); - return userProf.ID; - } - } /// /// Reset a user password -- cgit v1.1