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/Environment | |
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/Environment')
3 files changed, 10 insertions, 7 deletions
diff --git a/OpenSim/Region/Environment/Modules/InterGrid/OpenGridProtocolModule.cs b/OpenSim/Region/Environment/Modules/InterGrid/OpenGridProtocolModule.cs index e3e69b0..a855617 100644 --- a/OpenSim/Region/Environment/Modules/InterGrid/OpenGridProtocolModule.cs +++ b/OpenSim/Region/Environment/Modules/InterGrid/OpenGridProtocolModule.cs | |||
@@ -530,7 +530,10 @@ namespace OpenSim.Region.Environment.Modules.InterGrid | |||
530 | // get seed capagentData.firstname = FirstName;agentData.lastname = LastName; | 530 | // get seed capagentData.firstname = FirstName;agentData.lastname = LastName; |
531 | if (homeScene.CommsManager.UserService.GetUserProfile(agentData.AgentID) == null && !GridMode) | 531 | if (homeScene.CommsManager.UserService.GetUserProfile(agentData.AgentID) == null && !GridMode) |
532 | { | 532 | { |
533 | homeScene.CommsManager.AddUser(agentData.firstname, agentData.lastname, CreateRandomStr(7), "", homeScene.RegionInfo.RegionLocX, homeScene.RegionInfo.RegionLocY, agentData.AgentID); | 533 | homeScene.CommsManager.UserServiceAdmin.AddUser( |
534 | agentData.firstname, agentData.lastname, CreateRandomStr(7), "", | ||
535 | homeScene.RegionInfo.RegionLocX, homeScene.RegionInfo.RegionLocY, agentData.AgentID); | ||
536 | |||
534 | UserProfileData userProfile2 = homeScene.CommsManager.UserService.GetUserProfile(agentData.AgentID); | 537 | UserProfileData userProfile2 = homeScene.CommsManager.UserService.GetUserProfile(agentData.AgentID); |
535 | if (userProfile2 != null) | 538 | if (userProfile2 != null) |
536 | { | 539 | { |
@@ -539,7 +542,6 @@ namespace OpenSim.Region.Environment.Modules.InterGrid | |||
539 | userProfile.FirstLifeAboutText = "OGP USER"; | 542 | userProfile.FirstLifeAboutText = "OGP USER"; |
540 | homeScene.CommsManager.UserService.UpdateUserProfile(userProfile); | 543 | homeScene.CommsManager.UserService.UpdateUserProfile(userProfile); |
541 | } | 544 | } |
542 | |||
543 | } | 545 | } |
544 | 546 | ||
545 | // Stick our data in the cache so the region will know something about us | 547 | // Stick our data in the cache so the region will know something about us |
diff --git a/OpenSim/Region/Environment/Scenes/Tests/SceneObjectTests.cs b/OpenSim/Region/Environment/Scenes/Tests/SceneObjectTests.cs index 7f6fa3c..6577fe3 100644 --- a/OpenSim/Region/Environment/Scenes/Tests/SceneObjectTests.cs +++ b/OpenSim/Region/Environment/Scenes/Tests/SceneObjectTests.cs | |||
@@ -105,7 +105,8 @@ namespace OpenSim.Region.Environment.Scenes.Tests | |||
105 | ((LocalInventoryService)scene.CommsManager.InventoryService).AddPlugin(new TestInventoryDataPlugin()); | 105 | ((LocalInventoryService)scene.CommsManager.InventoryService).AddPlugin(new TestInventoryDataPlugin()); |
106 | 106 | ||
107 | Assert.That( | 107 | Assert.That( |
108 | scene.CommsManager.AddUser("Bob", "Hoskins", "test", "test@test.com", 1000, 1000, agentId), | 108 | scene.CommsManager.UserServiceAdmin.AddUser( |
109 | "Bob", "Hoskins", "test", "test@test.com", 1000, 1000, agentId), | ||
109 | Is.EqualTo(agentId)); | 110 | Is.EqualTo(agentId)); |
110 | 111 | ||
111 | IClientAPI client = SceneTestUtils.AddRootAgent(scene, agentId); | 112 | IClientAPI client = SceneTestUtils.AddRootAgent(scene, agentId); |
diff --git a/OpenSim/Region/Environment/Scenes/Tests/TestCommunicationsManager.cs b/OpenSim/Region/Environment/Scenes/Tests/TestCommunicationsManager.cs index 07cd429..b9804d9 100644 --- a/OpenSim/Region/Environment/Scenes/Tests/TestCommunicationsManager.cs +++ b/OpenSim/Region/Environment/Scenes/Tests/TestCommunicationsManager.cs | |||
@@ -38,13 +38,13 @@ namespace OpenSim.Region.Environment.Scenes.Tests | |||
38 | public TestCommunicationsManager() | 38 | public TestCommunicationsManager() |
39 | : base(null, null, null, false, null) | 39 | : base(null, null, null, false, null) |
40 | { | 40 | { |
41 | LocalUserServices lus = new LocalUserServices(null, 991, 992, null); | ||
42 | m_userService = lus; | ||
43 | m_userServiceAdmin = lus; | ||
44 | |||
45 | LocalInventoryService lis = new LocalInventoryService(); | 41 | LocalInventoryService lis = new LocalInventoryService(); |
46 | m_interServiceInventoryService = lis; | 42 | m_interServiceInventoryService = lis; |
47 | AddInventoryService(lis); | 43 | AddInventoryService(lis); |
44 | |||
45 | LocalUserServices lus = new LocalUserServices(null, 991, 992, lis); | ||
46 | m_userService = lus; | ||
47 | m_userServiceAdmin = lus; | ||
48 | } | 48 | } |
49 | } | 49 | } |
50 | } | 50 | } |