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.cs24
1 files changed, 20 insertions, 4 deletions
diff --git a/OpenSim/Services/UserAccountService/GridUserService.cs b/OpenSim/Services/UserAccountService/GridUserService.cs
index 43fa04b..b1cdd45 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;
@@ -73,7 +89,7 @@ namespace OpenSim.Services.UserAccountService
73 return info; 89 return info;
74 } 90 }
75 91
76 public GridUserInfo[] GetGridUserInfo(string[] userIDs) 92 public virtual GridUserInfo[] GetGridUserInfo(string[] userIDs)
77 { 93 {
78 List<GridUserInfo> ret = new List<GridUserInfo>(); 94 List<GridUserInfo> ret = new List<GridUserInfo>();
79 95
@@ -140,7 +156,7 @@ namespace OpenSim.Services.UserAccountService
140 156
141 public bool SetLastPosition(string userID, UUID sessionID, UUID regionID, Vector3 lastPosition, Vector3 lastLookAt) 157 public bool SetLastPosition(string userID, UUID sessionID, UUID regionID, Vector3 lastPosition, Vector3 lastLookAt)
142 { 158 {
143 //m_log.DebugFormat("[Grid User Service]: SetLastPosition for {0}", userID); 159 m_log.DebugFormat("[GRID USER SERVICE]: SetLastPosition for {0}", userID);
144 GridUserData d = m_Database.Get(userID); 160 GridUserData d = m_Database.Get(userID);
145 if (d == null) 161 if (d == null)
146 { 162 {