aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/ApplicationPlugins
diff options
context:
space:
mode:
authorDiva Canto2010-01-08 20:31:29 -0800
committerDiva Canto2010-01-08 20:31:29 -0800
commit6b60f3cce5b9dc8c005c9fdb53731dc4e3e45ee8 (patch)
tree4608042e707df452c7e59363927f5bd87249d34b /OpenSim/ApplicationPlugins
parentAdd migrations to add fields to user and auth tables (diff)
downloadopensim-SC_OLD-6b60f3cce5b9dc8c005c9fdb53731dc4e3e45ee8.zip
opensim-SC_OLD-6b60f3cce5b9dc8c005c9fdb53731dc4e3e45ee8.tar.gz
opensim-SC_OLD-6b60f3cce5b9dc8c005c9fdb53731dc4e3e45ee8.tar.bz2
opensim-SC_OLD-6b60f3cce5b9dc8c005c9fdb53731dc4e3e45ee8.tar.xz
A few more inches... Old friends things removed. Less references to UserProfileService.
Diffstat (limited to 'OpenSim/ApplicationPlugins')
-rw-r--r--OpenSim/ApplicationPlugins/RemoteController/RemoteAdminPlugin.cs31
1 files changed, 19 insertions, 12 deletions
diff --git a/OpenSim/ApplicationPlugins/RemoteController/RemoteAdminPlugin.cs b/OpenSim/ApplicationPlugins/RemoteController/RemoteAdminPlugin.cs
index d6d5700..a82d25a 100644
--- a/OpenSim/ApplicationPlugins/RemoteController/RemoteAdminPlugin.cs
+++ b/OpenSim/ApplicationPlugins/RemoteController/RemoteAdminPlugin.cs
@@ -591,24 +591,30 @@ namespace OpenSim.ApplicationPlugins.RemoteController
591 if (masterFirst != String.Empty && masterLast != String.Empty) // User requests a master avatar 591 if (masterFirst != String.Empty && masterLast != String.Empty) // User requests a master avatar
592 { 592 {
593 // no client supplied UUID: look it up... 593 // no client supplied UUID: look it up...
594 CachedUserInfo userInfo 594 UUID scopeID = m_app.SceneManager.CurrentOrFirstScene.RegionInfo.ScopeID;
595 = m_app.CommunicationsManager.UserProfileCacheService.GetUserDetails( 595 UserAccount account = m_app.SceneManager.CurrentOrFirstScene.UserAccountService.GetUserAccount(scopeID, masterFirst, masterLast);
596 masterFirst, masterLast); 596 if (null == account)
597
598 if (null == userInfo)
599 { 597 {
600 m_log.InfoFormat("master avatar does not exist, creating it"); 598 m_log.InfoFormat("master avatar does not exist, creating it");
601 // ...or create new user 599 // ...or create new user
602 userID = m_app.CommunicationsManager.UserAdminService.AddUser(
603 masterFirst, masterLast, masterPassword, "", region.RegionLocX, region.RegionLocY);
604 600
605 if (userID == UUID.Zero) 601 account = new UserAccount(scopeID, masterFirst, masterLast, "");
602 bool success = m_app.SceneManager.CurrentOrFirstScene.UserAccountService.StoreUserAccount(account);
603 if (success)
604 {
605 GridRegion home = m_app.SceneManager.CurrentOrFirstScene.GridService.GetRegionByPosition(scopeID,
606 (int)(region.RegionLocX * Constants.RegionSize), (int)(region.RegionLocY * Constants.RegionSize));
607
608 m_app.SceneManager.CurrentOrFirstScene.PresenceService.SetHomeLocation(account.PrincipalID.ToString(), home.RegionID, new Vector3(128, 128, 0), new Vector3(0, 1, 0));
609 }
610 else
606 throw new Exception(String.Format("failed to create new user {0} {1}", 611 throw new Exception(String.Format("failed to create new user {0} {1}",
607 masterFirst, masterLast)); 612 masterFirst, masterLast));
613
608 } 614 }
609 else 615 else
610 { 616 {
611 userID = userInfo.UserProfile.ID; 617 userID = account.PrincipalID;
612 } 618 }
613 } 619 }
614 } 620 }
@@ -2591,10 +2597,11 @@ namespace OpenSim.ApplicationPlugins.RemoteController
2591 2597
2592 foreach (UUID user in acl) 2598 foreach (UUID user in acl)
2593 { 2599 {
2594 CachedUserInfo udata = m_app.CommunicationsManager.UserProfileCacheService.GetUserDetails(user); 2600 UUID scopeID = m_app.SceneManager.CurrentOrFirstScene.RegionInfo.ScopeID;
2595 if (udata != null) 2601 UserAccount account = m_app.SceneManager.CurrentOrFirstScene.UserAccountService.GetUserAccount(scopeID, user);
2602 if (account != null)
2596 { 2603 {
2597 users[user.ToString()] = udata.UserProfile.Name; 2604 users[user.ToString()] = account.FirstName + " " + account.LastName;
2598 } 2605 }
2599 } 2606 }
2600 2607