* Use cached user profiles in osAvatarName2Key()

0.6.5-rc1
Justin Clarke Casey 2009-04-17 17:22:58 +00:00
parent 2fafc74c74
commit be1855f163
1 changed files with 5 additions and 4 deletions

View File

@ -35,6 +35,7 @@ using OpenMetaverse;
using Nini.Config; using Nini.Config;
using OpenSim; using OpenSim;
using OpenSim.Framework; using OpenSim.Framework;
using OpenSim.Framework.Communications.Cache;
using OpenSim.Framework.Console; using OpenSim.Framework.Console;
using OpenSim.Region.Framework.Interfaces; using OpenSim.Region.Framework.Interfaces;
using OpenSim.Region.Framework.Scenes; using OpenSim.Region.Framework.Scenes;
@ -1348,15 +1349,15 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
{ {
CheckThreatLevel(ThreatLevel.Low, "osAvatarName2Key"); CheckThreatLevel(ThreatLevel.Low, "osAvatarName2Key");
UserProfileData UserProfile = World.CommsManager.UserService CachedUserInfo userInfo = World.CommsManager.UserProfileCacheService.GetUserDetails(firstname, lastname);
.GetUserProfile(firstname, lastname);
if (UserProfile==null) if (null == userInfo)
{ {
return UUID.Zero.ToString(); return UUID.Zero.ToString();
} }
else else
{ {
return UserProfile.ID.ToString(); return userInfo.UserProfile.ID.ToString();
} }
} }