diff options
author | Diva Canto | 2013-07-02 14:31:39 -0700 |
---|---|---|
committer | Diva Canto | 2013-07-02 14:31:39 -0700 |
commit | e984bfb4c63718d5176b17f6beea46f4512cf304 (patch) | |
tree | c5c8fda8a5b7fcc7a493d5f877daadf10b017fa2 /OpenSim/Services/UserAccountService/GridUserService.cs | |
parent | HG: close a loophole by which if something was wrong with the ServiceURLs it ... (diff) | |
download | opensim-SC-e984bfb4c63718d5176b17f6beea46f4512cf304.zip opensim-SC-e984bfb4c63718d5176b17f6beea46f4512cf304.tar.gz opensim-SC-e984bfb4c63718d5176b17f6beea46f4512cf304.tar.bz2 opensim-SC-e984bfb4c63718d5176b17f6beea46f4512cf304.tar.xz |
This should have a strong effect on the Unknown User issue mantis #6625
Diffstat (limited to 'OpenSim/Services/UserAccountService/GridUserService.cs')
-rw-r--r-- | OpenSim/Services/UserAccountService/GridUserService.cs | 17 |
1 files changed, 16 insertions, 1 deletions
diff --git a/OpenSim/Services/UserAccountService/GridUserService.cs b/OpenSim/Services/UserAccountService/GridUserService.cs index 8388180..62b82fe 100644 --- a/OpenSim/Services/UserAccountService/GridUserService.cs +++ b/OpenSim/Services/UserAccountService/GridUserService.cs | |||
@@ -51,7 +51,22 @@ namespace OpenSim.Services.UserAccountService | |||
51 | 51 | ||
52 | public virtual GridUserInfo GetGridUserInfo(string userID) | 52 | public virtual GridUserInfo GetGridUserInfo(string userID) |
53 | { | 53 | { |
54 | GridUserData d = m_Database.Get(userID); | 54 | GridUserData d = null; |
55 | if (userID.Length > 36) // it's a UUI | ||
56 | d = m_Database.Get(userID); | ||
57 | else // it's a UUID | ||
58 | { | ||
59 | GridUserData[] ds = m_Database.GetAll(userID); | ||
60 | if (ds == null) | ||
61 | return null; | ||
62 | if (ds.Length > 0) | ||
63 | { | ||
64 | d = ds[0]; | ||
65 | foreach (GridUserData dd in ds) | ||
66 | if (dd.UserID.Length > d.UserID.Length) // find the longest | ||
67 | d = dd; | ||
68 | } | ||
69 | } | ||
55 | 70 | ||
56 | if (d == null) | 71 | if (d == null) |
57 | return null; | 72 | return null; |