diff options
Diffstat (limited to 'OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs')
-rw-r--r-- | OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs | 16 |
1 files changed, 7 insertions, 9 deletions
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs index 2c8b0ea..7462ba0 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs | |||
@@ -36,7 +36,7 @@ using OpenMetaverse; | |||
36 | using Nini.Config; | 36 | using Nini.Config; |
37 | using OpenSim; | 37 | using OpenSim; |
38 | using OpenSim.Framework; | 38 | using OpenSim.Framework; |
39 | using OpenSim.Framework.Communications.Cache; | 39 | |
40 | using OpenSim.Framework.Console; | 40 | using OpenSim.Framework.Console; |
41 | using OpenSim.Region.CoreModules.Avatar.NPC; | 41 | using OpenSim.Region.CoreModules.Avatar.NPC; |
42 | using OpenSim.Region.Framework.Interfaces; | 42 | using OpenSim.Region.Framework.Interfaces; |
@@ -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 |