From be1855f163b32d3644f95c1d017fc6db350cb9af Mon Sep 17 00:00:00 2001 From: Justin Clarke Casey Date: Fri, 17 Apr 2009 17:22:58 +0000 Subject: * Use cached user profiles in osAvatarName2Key() --- .../Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'OpenSim/Region/ScriptEngine/Shared/Api/Implementation') diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs index 36c1639..0cfa61d 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs @@ -35,6 +35,7 @@ using OpenMetaverse; using Nini.Config; using OpenSim; using OpenSim.Framework; +using OpenSim.Framework.Communications.Cache; using OpenSim.Framework.Console; using OpenSim.Region.Framework.Interfaces; using OpenSim.Region.Framework.Scenes; @@ -1348,15 +1349,15 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api { CheckThreatLevel(ThreatLevel.Low, "osAvatarName2Key"); - UserProfileData UserProfile = World.CommsManager.UserService - .GetUserProfile(firstname, lastname); - if (UserProfile==null) + CachedUserInfo userInfo = World.CommsManager.UserProfileCacheService.GetUserDetails(firstname, lastname); + + if (null == userInfo) { return UUID.Zero.ToString(); } else { - return UserProfile.ID.ToString(); + return userInfo.UserProfile.ID.ToString(); } } -- cgit v1.1