diff options
author | Justin Clarke Casey | 2008-11-28 15:34:30 +0000 |
---|---|---|
committer | Justin Clarke Casey | 2008-11-28 15:34:30 +0000 |
commit | 0862627b341641ec0223bb4191dfee8d85724c9e (patch) | |
tree | ef1815b067c345aa92a81375f12137a3e47876f3 /OpenSim/Region/Communications/Local | |
parent | * Changed name of auth function to better reflect actual use (diff) | |
download | opensim-SC_OLD-0862627b341641ec0223bb4191dfee8d85724c9e.zip opensim-SC_OLD-0862627b341641ec0223bb4191dfee8d85724c9e.tar.gz opensim-SC_OLD-0862627b341641ec0223bb4191dfee8d85724c9e.tar.bz2 opensim-SC_OLD-0862627b341641ec0223bb4191dfee8d85724c9e.tar.xz |
* refactor: move CreateUser into UserServiceAdmin
Diffstat (limited to 'OpenSim/Region/Communications/Local')
-rw-r--r-- | OpenSim/Region/Communications/Local/LocalLoginService.cs | 11 | ||||
-rw-r--r-- | OpenSim/Region/Communications/Local/LocalUserServices.cs | 23 |
2 files changed, 7 insertions, 27 deletions
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 | |||
94 | //no current user account so make one | 94 | //no current user account so make one |
95 | m_log.Info("[LOGIN]: No user account found so creating a new one."); | 95 | m_log.Info("[LOGIN]: No user account found so creating a new one."); |
96 | 96 | ||
97 | m_userManager.AddUserProfile(firstname, lastname, "test", "", defaultHomeX, defaultHomeY); | 97 | m_userManager.AddUser(firstname, lastname, "test", "", defaultHomeX, defaultHomeY); |
98 | 98 | ||
99 | profile = m_userManager.GetUserProfile(firstname, lastname); | 99 | return m_userManager.GetUserProfile(firstname, lastname); |
100 | if (profile != null) | ||
101 | { | ||
102 | m_interServiceInventoryService.CreateNewUserInventory(profile.ID); | ||
103 | } | ||
104 | |||
105 | return profile; | ||
106 | } | 100 | } |
101 | |||
107 | return null; | 102 | return null; |
108 | } | 103 | } |
109 | 104 | ||
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 | |||
34 | { | 34 | { |
35 | public class LocalUserServices : UserManagerBase | 35 | public class LocalUserServices : UserManagerBase |
36 | { | 36 | { |
37 | // private readonly NetworkServersInfo m_serversInfo; | ||
38 | private readonly uint m_defaultHomeX; | 37 | private readonly uint m_defaultHomeX; |
39 | private readonly uint m_defaultHomeY; | 38 | private readonly uint m_defaultHomeY; |
40 | private IInterServiceInventoryServices m_interServiceInventoryService; | ||
41 | 39 | ||
42 | /// <summary> | 40 | /// <summary> |
43 | /// | 41 | /// User services used when OpenSim is running in standalone mode. |
44 | /// </summary> | 42 | /// </summary> |
45 | /// <param name="serversInfo"></param> | 43 | /// <param name="serversInfo"></param> |
46 | /// <param name="defaultHomeLocX"></param> | 44 | /// <param name="defaultHomeLocX"></param> |
@@ -49,13 +47,12 @@ namespace OpenSim.Region.Communications.Local | |||
49 | /// <param name="statsCollector">Can be null if stats collection is not required.</param> | 47 | /// <param name="statsCollector">Can be null if stats collection is not required.</param> |
50 | public LocalUserServices(NetworkServersInfo serversInfo, uint defaultHomeLocX, uint defaultHomeLocY, | 48 | public LocalUserServices(NetworkServersInfo serversInfo, uint defaultHomeLocX, uint defaultHomeLocY, |
51 | IInterServiceInventoryServices interServiceInventoryService) | 49 | IInterServiceInventoryServices interServiceInventoryService) |
50 | : base(interServiceInventoryService) | ||
52 | { | 51 | { |
53 | // m_serversInfo = serversInfo; | 52 | // m_serversInfo = serversInfo; |
54 | 53 | ||
55 | m_defaultHomeX = defaultHomeLocX; | 54 | m_defaultHomeX = defaultHomeLocX; |
56 | m_defaultHomeY = defaultHomeLocY; | 55 | m_defaultHomeY = defaultHomeLocY; |
57 | |||
58 | m_interServiceInventoryService = interServiceInventoryService; | ||
59 | } | 56 | } |
60 | 57 | ||
61 | public override UserProfileData SetupMasterUser(string firstName, string lastName) | 58 | public override UserProfileData SetupMasterUser(string firstName, string lastName) |
@@ -72,20 +69,8 @@ namespace OpenSim.Region.Communications.Local | |||
72 | } | 69 | } |
73 | 70 | ||
74 | Console.WriteLine("Unknown Master User. Sandbox Mode: Creating Account"); | 71 | Console.WriteLine("Unknown Master User. Sandbox Mode: Creating Account"); |
75 | AddUserProfile(firstName, lastName, password, "", m_defaultHomeX, m_defaultHomeY); | 72 | AddUser(firstName, lastName, password, "", m_defaultHomeX, m_defaultHomeY); |
76 | 73 | return GetUserProfile(firstName, lastName); | |
77 | profile = GetUserProfile(firstName, lastName); | ||
78 | |||
79 | if (profile == null) | ||
80 | { | ||
81 | Console.WriteLine("[LOCAL USER SERVICES]: Unknown Master User after creation attempt. No clue what to do here."); | ||
82 | } | ||
83 | else | ||
84 | { | ||
85 | m_interServiceInventoryService.CreateNewUserInventory(profile.ID); | ||
86 | } | ||
87 | |||
88 | return profile; | ||
89 | } | 74 | } |
90 | 75 | ||
91 | public override UserProfileData SetupMasterUser(UUID uuid) | 76 | public override UserProfileData SetupMasterUser(UUID uuid) |