* OMG! All but one references to UserProfileCacheService have been rerouted!

* HG is seriously broken here
* Compiles. Untested.
This commit is contained in:
Diva Canto
2010-01-10 10:40:07 -08:00
parent 78e9dc7c2c
commit 1e1b2ab221
34 changed files with 795 additions and 1182 deletions

View File

@@ -849,10 +849,10 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
public string resolveName(UUID objecUUID)
{
// try avatar username surname
CachedUserInfo profile = World.CommsManager.UserProfileCacheService.GetUserDetails(objecUUID);
if (profile != null && profile.UserProfile != null)
UserAccount account = World.UserAccountService.GetUserAccount(World.RegionInfo.ScopeID, objecUUID);
if (account != null)
{
string avatarname = profile.UserProfile.FirstName + " " + profile.UserProfile.SurName;
string avatarname = account.Name;
return avatarname;
}
// try an scene object

View File

@@ -1691,15 +1691,14 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
{
CheckThreatLevel(ThreatLevel.Low, "osAvatarName2Key");
CachedUserInfo userInfo = World.CommsManager.UserProfileCacheService.GetUserDetails(firstname, lastname);
if (null == userInfo)
UserAccount account = World.UserAccountService.GetUserAccount(World.RegionInfo.ScopeID, firstname, lastname);
if (null == account)
{
return UUID.Zero.ToString();
}
else
{
return userInfo.UserProfile.ID.ToString();
return account.PrincipalID.ToString();
}
}
@@ -1710,15 +1709,14 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
if (UUID.TryParse(id, out key))
{
CachedUserInfo userInfo = World.CommsManager.UserProfileCacheService.GetUserDetails(key);
if (null == userInfo)
UserAccount account = World.UserAccountService.GetUserAccount(World.RegionInfo.ScopeID, key);
if (null == account)
{
return "";
}
else
{
return userInfo.UserProfile.Name;
return account.Name;
}
}
else