aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/ScriptEngine
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Region/ScriptEngine')
-rw-r--r--OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs6
-rw-r--r--OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs14
2 files changed, 9 insertions, 11 deletions
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
849 public string resolveName(UUID objecUUID) 849 public string resolveName(UUID objecUUID)
850 { 850 {
851 // try avatar username surname 851 // try avatar username surname
852 CachedUserInfo profile = World.CommsManager.UserProfileCacheService.GetUserDetails(objecUUID); 852 UserAccount account = World.UserAccountService.GetUserAccount(World.RegionInfo.ScopeID, objecUUID);
853 if (profile != null && profile.UserProfile != null) 853 if (account != null)
854 { 854 {
855 string avatarname = profile.UserProfile.FirstName + " " + profile.UserProfile.SurName; 855 string avatarname = account.Name;
856 return avatarname; 856 return avatarname;
857 } 857 }
858 // try an scene object 858 // 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
1691 { 1691 {
1692 CheckThreatLevel(ThreatLevel.Low, "osAvatarName2Key"); 1692 CheckThreatLevel(ThreatLevel.Low, "osAvatarName2Key");
1693 1693
1694 CachedUserInfo userInfo = World.CommsManager.UserProfileCacheService.GetUserDetails(firstname, lastname); 1694 UserAccount account = World.UserAccountService.GetUserAccount(World.RegionInfo.ScopeID, firstname, lastname);
1695 1695 if (null == account)
1696 if (null == userInfo)
1697 { 1696 {
1698 return UUID.Zero.ToString(); 1697 return UUID.Zero.ToString();
1699 } 1698 }
1700 else 1699 else
1701 { 1700 {
1702 return userInfo.UserProfile.ID.ToString(); 1701 return account.PrincipalID.ToString();
1703 } 1702 }
1704 } 1703 }
1705 1704
@@ -1710,15 +1709,14 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
1710 1709
1711 if (UUID.TryParse(id, out key)) 1710 if (UUID.TryParse(id, out key))
1712 { 1711 {
1713 CachedUserInfo userInfo = World.CommsManager.UserProfileCacheService.GetUserDetails(key); 1712 UserAccount account = World.UserAccountService.GetUserAccount(World.RegionInfo.ScopeID, key);
1714 1713 if (null == account)
1715 if (null == userInfo)
1716 { 1714 {
1717 return ""; 1715 return "";
1718 } 1716 }
1719 else 1717 else
1720 { 1718 {
1721 return userInfo.UserProfile.Name; 1719 return account.Name;
1722 } 1720 }
1723 } 1721 }
1724 else 1722 else