From 1e1b2ab221851efc414678b7ea52ef2ca788ce9f Mon Sep 17 00:00:00 2001 From: Diva Canto Date: Sun, 10 Jan 2010 10:40:07 -0800 Subject: * OMG! All but one references to UserProfileCacheService have been rerouted! * HG is seriously broken here * Compiles. Untested. --- .../ScriptEngine/Shared/Api/Implementation/LSL_Api.cs | 6 +++--- .../ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs | 14 ++++++-------- 2 files changed, 9 insertions(+), 11 deletions(-) (limited to 'OpenSim/Region/ScriptEngine') diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs index 2bfd3fb..876668c 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs @@ -849,10 +849,10 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api public string resolveName(UUID objecUUID) { // try avatar username surname - CachedUserInfo profile = World.CommsManager.UserProfileCacheService.GetUserDetails(objecUUID); - if (profile != null && profile.UserProfile != null) + UserAccount account = World.UserAccountService.GetUserAccount(World.RegionInfo.ScopeID, objecUUID); + if (account != null) { - string avatarname = profile.UserProfile.FirstName + " " + profile.UserProfile.SurName; + string avatarname = account.Name; return avatarname; } // try an scene object diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs index d8b9159..aa878e6 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs @@ -1691,15 +1691,14 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api { CheckThreatLevel(ThreatLevel.Low, "osAvatarName2Key"); - CachedUserInfo userInfo = World.CommsManager.UserProfileCacheService.GetUserDetails(firstname, lastname); - - if (null == userInfo) + UserAccount account = World.UserAccountService.GetUserAccount(World.RegionInfo.ScopeID, firstname, lastname); + if (null == account) { return UUID.Zero.ToString(); } else { - return userInfo.UserProfile.ID.ToString(); + return account.PrincipalID.ToString(); } } @@ -1710,15 +1709,14 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api if (UUID.TryParse(id, out key)) { - CachedUserInfo userInfo = World.CommsManager.UserProfileCacheService.GetUserDetails(key); - - if (null == userInfo) + UserAccount account = World.UserAccountService.GetUserAccount(World.RegionInfo.ScopeID, key); + if (null == account) { return ""; } else { - return userInfo.UserProfile.Name; + return account.Name; } } else -- cgit v1.1