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/LocalLoginService.cs | 11 +++--------
.../Communications/Local/LocalUserServices.cs | 23 ++++------------------
2 files changed, 7 insertions(+), 27 deletions(-)
(limited to 'OpenSim/Region/Communications')
diff --git a/OpenSim/Region/Communications/Local/LocalLoginService.cs b/OpenSim/Region/Communications/Local/LocalLoginService.cs
index 81cbbb4..50a8e16 100644
--- a/OpenSim/Region/Communications/Local/LocalLoginService.cs
+++ b/OpenSim/Region/Communications/Local/LocalLoginService.cs
@@ -94,16 +94,11 @@ namespace OpenSim.Region.Communications.Local
//no current user account so make one
m_log.Info("[LOGIN]: No user account found so creating a new one.");
- m_userManager.AddUserProfile(firstname, lastname, "test", "", defaultHomeX, defaultHomeY);
+ m_userManager.AddUser(firstname, lastname, "test", "", defaultHomeX, defaultHomeY);
- profile = m_userManager.GetUserProfile(firstname, lastname);
- if (profile != null)
- {
- m_interServiceInventoryService.CreateNewUserInventory(profile.ID);
- }
-
- return profile;
+ return m_userManager.GetUserProfile(firstname, lastname);
}
+
return null;
}
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