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/Local/LocalUserServices.cs | 23 ++++------------------ 1 file changed, 4 insertions(+), 19 deletions(-) (limited to 'OpenSim/Region/Communications/Local/LocalUserServices.cs') diff --git a/OpenSim/Region/Communications/Local/LocalUserServices.cs b/OpenSim/Region/Communications/Local/LocalUserServices.cs index 8649d61..e0c9c83 100644 --- a/OpenSim/Region/Communications/Local/LocalUserServices.cs +++ b/OpenSim/Region/Communications/Local/LocalUserServices.cs @@ -34,13 +34,11 @@ namespace OpenSim.Region.Communications.Local { public class LocalUserServices : UserManagerBase { - // private readonly NetworkServersInfo m_serversInfo; private readonly uint m_defaultHomeX; private readonly uint m_defaultHomeY; - private IInterServiceInventoryServices m_interServiceInventoryService; /// - /// + /// User services used when OpenSim is running in standalone mode. /// /// /// @@ -49,13 +47,12 @@ namespace OpenSim.Region.Communications.Local /// Can be null if stats collection is not required. public LocalUserServices(NetworkServersInfo serversInfo, uint defaultHomeLocX, uint defaultHomeLocY, IInterServiceInventoryServices interServiceInventoryService) + : base(interServiceInventoryService) { // m_serversInfo = serversInfo; m_defaultHomeX = defaultHomeLocX; m_defaultHomeY = defaultHomeLocY; - - m_interServiceInventoryService = interServiceInventoryService; } public override UserProfileData SetupMasterUser(string firstName, string lastName) @@ -72,20 +69,8 @@ namespace OpenSim.Region.Communications.Local } Console.WriteLine("Unknown Master User. Sandbox Mode: Creating Account"); - AddUserProfile(firstName, lastName, password, "", m_defaultHomeX, m_defaultHomeY); - - profile = GetUserProfile(firstName, lastName); - - if (profile == null) - { - Console.WriteLine("[LOCAL USER SERVICES]: Unknown Master User after creation attempt. No clue what to do here."); - } - else - { - m_interServiceInventoryService.CreateNewUserInventory(profile.ID); - } - - return profile; + AddUser(firstName, lastName, password, "", m_defaultHomeX, m_defaultHomeY); + return GetUserProfile(firstName, lastName); } public override UserProfileData SetupMasterUser(UUID uuid) -- cgit v1.1