aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
-rw-r--r--OpenSim/Region/CoreModules/Framework/UserManagement/UserManagementModule.cs27
1 files changed, 19 insertions, 8 deletions
diff --git a/OpenSim/Region/CoreModules/Framework/UserManagement/UserManagementModule.cs b/OpenSim/Region/CoreModules/Framework/UserManagement/UserManagementModule.cs
index 640ca4e..eabeaf1 100644
--- a/OpenSim/Region/CoreModules/Framework/UserManagement/UserManagementModule.cs
+++ b/OpenSim/Region/CoreModules/Framework/UserManagement/UserManagementModule.cs
@@ -489,6 +489,7 @@ namespace OpenSim.Region.CoreModules.Framework.UserManagement
489 489
490 List<string> missing = new List<string>(); 490 List<string> missing = new List<string>();
491 Dictionary<UUID,string> untried = new Dictionary<UUID, string>(); 491 Dictionary<UUID,string> untried = new Dictionary<UUID, string>();
492
492 // look in cache 493 // look in cache
493 UserData userdata = new UserData(); 494 UserData userdata = new UserData();
494 495
@@ -500,7 +501,7 @@ namespace OpenSim.Region.CoreModules.Framework.UserManagement
500 lock (m_UserCache) 501 lock (m_UserCache)
501 { 502 {
502 if (m_UserCache.TryGetValue(uuid, out userdata) && 503 if (m_UserCache.TryGetValue(uuid, out userdata) &&
503 userdata.FirstName != "Unknown") 504 userdata.FirstName != "Unknown" && userdata.FirstName != string.Empty)
504 { 505 {
505 string name = userdata.FirstName + " " + userdata.LastName; 506 string name = userdata.FirstName + " " + userdata.LastName;
506 507
@@ -562,20 +563,30 @@ namespace OpenSim.Region.CoreModules.Framework.UserManagement
562 if (uInfo != null) 563 if (uInfo != null)
563 { 564 {
564 string url, first, last, tmp; 565 string url, first, last, tmp;
565 UUID u; 566
566 if(uInfo.UserID.Length <= 36) 567 if(uInfo.UserID.Length <= 36)
567 continue; 568 continue;
568 569
569 if (Util.ParseUniversalUserIdentifier(uInfo.UserID, out u, out url, out first, out last, out tmp)) 570 if (Util.ParseUniversalUserIdentifier(uInfo.UserID, out uuid, out url, out first, out last, out tmp))
570 { 571 {
571 if (url != string.Empty) 572 if (url != string.Empty)
572 { 573 {
573 try 574 try
574 { 575 {
575 string name = first.Replace(" ", ".") + "." + last.Replace(" ", ".") + " @" + new Uri(url).Authority; 576 userdata = new UserData();
576 ret[u] = name; 577 userdata.FirstName = first.Replace(" ", ".") + "." + last.Replace(" ", ".");
577 missing.Remove(u.ToString()); 578 userdata.LastName = "@" + new Uri(url).Authority;
578 untried.Remove(u); 579 userdata.Id = uuid;
580 userdata.HomeURL = url;
581 userdata.IsUnknownUser = false;
582 userdata.HasGridUserTried = true;
583 lock (m_UserCache)
584 m_UserCache[uuid] = userdata;
585
586 string name = userdata.FirstName + " " + userdata.LastName;
587 ret[uuid] = name;
588 missing.Remove(uuid.ToString());
589 untried.Remove(uuid);
579 } 590 }
580 catch 591 catch
581 { 592 {
@@ -592,7 +603,7 @@ namespace OpenSim.Region.CoreModules.Framework.UserManagement
592 foreach(KeyValuePair<UUID, string> kvp in untried) 603 foreach(KeyValuePair<UUID, string> kvp in untried)
593 { 604 {
594 ret[kvp.Key] = kvp.Value; 605 ret[kvp.Key] = kvp.Value;
595 missing.Remove(kvp.Key.ToString()); 606 missing.Remove((kvp.Key).ToString());
596 } 607 }
597 } 608 }
598 609