mantis 8398: fix with previus commits; removed redundante code

0.9.1.0-post-fixes
UbitUmarov 2018-10-20 14:10:56 +01:00
parent 2ea5f09ed3
commit 8b5b251d1a
1 changed files with 5 additions and 11 deletions

View File

@ -2413,15 +2413,15 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
return string.Empty;
}
// Check if the user is already cached
// Check local grid
UUID userID = userManager.GetUserIdByName(firstname, lastname);
if (userID != UUID.Zero)
return userID.ToString();
// Query for the user
String realFirstName; String realLastName; String serverURI;
// HG ?
string realFirstName;
string realLastName;
string serverURI;
if (Util.ParseForeignAvatarName(firstname, lastname, out realFirstName, out realLastName, out serverURI))
{
try
@ -2443,12 +2443,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
// m_log.Warn("[osAvatarName2Key] UserAgentServiceConnector - Unable to connect to destination grid ", e);
}
}
else
{
UserAccount account = World.UserAccountService.GetUserAccount(World.RegionInfo.ScopeID, firstname, lastname);
if (account != null)
return account.PrincipalID.ToString();
}
return UUID.Zero.ToString();
}