diff options
author | Christopher | 2015-07-31 22:16:38 +0200 |
---|---|---|
committer | Oren Hurvitz | 2015-08-02 09:17:50 +0100 |
commit | bccf785665ad0749decf7b2ffb9fc059992017e5 (patch) | |
tree | 706b816fb28041a5cf14cd1228190de288508893 /OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs | |
parent | Mantis #7657: similar fixes for FSAssets. (diff) | |
download | opensim-SC_OLD-bccf785665ad0749decf7b2ffb9fc059992017e5.zip opensim-SC_OLD-bccf785665ad0749decf7b2ffb9fc059992017e5.tar.gz opensim-SC_OLD-bccf785665ad0749decf7b2ffb9fc059992017e5.tar.bz2 opensim-SC_OLD-bccf785665ad0749decf7b2ffb9fc059992017e5.tar.xz |
osKey2Name returns now correct values for HG users who are not on the region.
Signed-off-by: Oren Hurvitz <orenh@kitely.com>
Diffstat (limited to '')
-rw-r--r-- | OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs | 28 |
1 files changed, 18 insertions, 10 deletions
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs index 517a9d9..d42a125 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs | |||
@@ -2073,19 +2073,27 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
2073 | if (UUID.TryParse(id, out key)) | 2073 | if (UUID.TryParse(id, out key)) |
2074 | { | 2074 | { |
2075 | UserAccount account = World.UserAccountService.GetUserAccount(World.RegionInfo.ScopeID, key); | 2075 | UserAccount account = World.UserAccountService.GetUserAccount(World.RegionInfo.ScopeID, key); |
2076 | if (null == account) | 2076 | if (account != null) |
2077 | { | ||
2078 | return ""; | ||
2079 | } | ||
2080 | else | ||
2081 | { | ||
2082 | return account.Name; | 2077 | return account.Name; |
2078 | |||
2079 | if (m_ScriptEngine.World.GridUserService != null) | ||
2080 | { | ||
2081 | GridUserInfo uInfo = m_ScriptEngine.World.GridUserService.GetGridUserInfo(key.ToString()); | ||
2082 | |||
2083 | if (uInfo != null) | ||
2084 | { | ||
2085 | UUID userUUID; String gridURL; String firstName; String lastName; String tmp; | ||
2086 | |||
2087 | if (Util.ParseUniversalUserIdentifier(uInfo.UserID, out userUUID, out gridURL, out firstName, out lastName, out tmp)) | ||
2088 | { | ||
2089 | string grid = new Uri(gridURL).Authority; | ||
2090 | return firstName + "." + lastName + " @" + grid; | ||
2091 | } | ||
2092 | } | ||
2083 | } | 2093 | } |
2084 | } | 2094 | } |
2085 | else | 2095 | |
2086 | { | 2096 | return ""; |
2087 | return ""; | ||
2088 | } | ||
2089 | } | 2097 | } |
2090 | 2098 | ||
2091 | private enum InfoType | 2099 | private enum InfoType |