* Use cached user profiles in osAvatarName2Key()
parent
2fafc74c74
commit
be1855f163
|
@ -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();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue