osKey2Name returns now correct values for HG users who are not on the region.
Signed-off-by: Oren Hurvitz <orenh@kitely.com>0.8.2-post-fixes
parent
c8cd2f18f5
commit
bccf785665
|
@ -2073,19 +2073,27 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
|
|||
if (UUID.TryParse(id, out key))
|
||||
{
|
||||
UserAccount account = World.UserAccountService.GetUserAccount(World.RegionInfo.ScopeID, key);
|
||||
if (null == account)
|
||||
{
|
||||
return "";
|
||||
}
|
||||
else
|
||||
{
|
||||
if (account != null)
|
||||
return account.Name;
|
||||
|
||||
if (m_ScriptEngine.World.GridUserService != null)
|
||||
{
|
||||
GridUserInfo uInfo = m_ScriptEngine.World.GridUserService.GetGridUserInfo(key.ToString());
|
||||
|
||||
if (uInfo != null)
|
||||
{
|
||||
UUID userUUID; String gridURL; String firstName; String lastName; String tmp;
|
||||
|
||||
if (Util.ParseUniversalUserIdentifier(uInfo.UserID, out userUUID, out gridURL, out firstName, out lastName, out tmp))
|
||||
{
|
||||
string grid = new Uri(gridURL).Authority;
|
||||
return firstName + "." + lastName + " @" + grid;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
return "";
|
||||
}
|
||||
|
||||
return "";
|
||||
}
|
||||
|
||||
private enum InfoType
|
||||
|
|
Loading…
Reference in New Issue