aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Services/UserAccountService/GridUserService.cs
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Services/UserAccountService/GridUserService.cs')
-rw-r--r--OpenSim/Services/UserAccountService/GridUserService.cs20
1 files changed, 18 insertions, 2 deletions
diff --git a/OpenSim/Services/UserAccountService/GridUserService.cs b/OpenSim/Services/UserAccountService/GridUserService.cs
index 8388180..fa9a4a8 100644
--- a/OpenSim/Services/UserAccountService/GridUserService.cs
+++ b/OpenSim/Services/UserAccountService/GridUserService.cs
@@ -46,12 +46,28 @@ namespace OpenSim.Services.UserAccountService
46 46
47 public GridUserService(IConfigSource config) : base(config) 47 public GridUserService(IConfigSource config) : base(config)
48 { 48 {
49 m_log.Debug("[USER GRID SERVICE]: Starting user grid service"); 49 m_log.Debug("[GRID USER SERVICE]: Starting user grid service");
50 } 50 }
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
63 if (ds.Length > 0)
64 {
65 d = ds[0];
66 foreach (GridUserData dd in ds)
67 if (dd.UserID.Length > d.UserID.Length) // find the longest
68 d = dd;
69 }
70 }
55 71
56 if (d == null) 72 if (d == null)
57 return null; 73 return null;