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,20 +2073,28 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
|
||||||
if (UUID.TryParse(id, out key))
|
if (UUID.TryParse(id, out key))
|
||||||
{
|
{
|
||||||
UserAccount account = World.UserAccountService.GetUserAccount(World.RegionInfo.ScopeID, key);
|
UserAccount account = World.UserAccountService.GetUserAccount(World.RegionInfo.ScopeID, key);
|
||||||
if (null == account)
|
if (account != null)
|
||||||
{
|
|
||||||
return "";
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
return account.Name;
|
return account.Name;
|
||||||
}
|
|
||||||
}
|
if (m_ScriptEngine.World.GridUserService != null)
|
||||||
else
|
|
||||||
{
|
{
|
||||||
return "";
|
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;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return "";
|
||||||
|
}
|
||||||
|
|
||||||
private enum InfoType
|
private enum InfoType
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue