From 96f387ce491e033344f6097dcaf9852fc6309aed Mon Sep 17 00:00:00 2001 From: Melanie Date: Wed, 30 Dec 2009 22:44:04 +0000 Subject: [PATCH] Make ScopeID be wild on user queries. Just pass it as UUID.Zero --- .../UserAccountService/UserAccountService.cs | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) diff --git a/OpenSim/Services/UserAccountService/UserAccountService.cs b/OpenSim/Services/UserAccountService/UserAccountService.cs index ee9ea9464c..0270f9d4e4 100644 --- a/OpenSim/Services/UserAccountService/UserAccountService.cs +++ b/OpenSim/Services/UserAccountService/UserAccountService.cs @@ -44,9 +44,20 @@ namespace OpenSim.Services.UserAccountService public UserAccount GetUserAccount(UUID scopeID, string firstName, string lastName) { - UserAccountData[] d = m_Database.Get( - new string[] {"ScopeID", "FirstName", "LastName"}, - new string[] {scopeID.ToString(), firstName, lastName}); + UserAccountData[] d; + + if (scopeID != UUID.Zero) + { + d = m_Database.Get( + new string[] {"ScopeID", "FirstName", "LastName"}, + new string[] {scopeID.ToString(), firstName, lastName}); + } + else + { + d = m_Database.Get( + new string[] {"FirstName", "LastName"}, + new string[] {firstName, lastName}); + } if (d.Length < 1) return null;