From e984bfb4c63718d5176b17f6beea46f4512cf304 Mon Sep 17 00:00:00 2001 From: Diva Canto Date: Tue, 2 Jul 2013 14:31:39 -0700 Subject: This should have a strong effect on the Unknown User issue mantis #6625 --- OpenSim/Services/UserAccountService/GridUserService.cs | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) (limited to 'OpenSim/Services') 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 public virtual GridUserInfo GetGridUserInfo(string userID) { - GridUserData d = m_Database.Get(userID); + GridUserData d = null; + if (userID.Length > 36) // it's a UUI + d = m_Database.Get(userID); + else // it's a UUID + { + GridUserData[] ds = m_Database.GetAll(userID); + if (ds == null) + return null; + if (ds.Length > 0) + { + d = ds[0]; + foreach (GridUserData dd in ds) + if (dd.UserID.Length > d.UserID.Length) // find the longest + d = dd; + } + } if (d == null) return null; -- cgit v1.1