diff options
Diffstat (limited to 'OpenSim/Services')
-rw-r--r-- | OpenSim/Services/Interfaces/IUserManagement.cs | 2 | ||||
-rw-r--r-- | OpenSim/Services/UserAccountService/UserAccountService.cs | 12 |
2 files changed, 4 insertions, 10 deletions
diff --git a/OpenSim/Services/Interfaces/IUserManagement.cs b/OpenSim/Services/Interfaces/IUserManagement.cs index 3bdf86d..39268c0 100644 --- a/OpenSim/Services/Interfaces/IUserManagement.cs +++ b/OpenSim/Services/Interfaces/IUserManagement.cs | |||
@@ -42,7 +42,7 @@ namespace OpenSim.Services.Interfaces | |||
42 | string GetUserUUI(UUID uuid); | 42 | string GetUserUUI(UUID uuid); |
43 | bool GetUserUUI(UUID userID, out string uui); | 43 | bool GetUserUUI(UUID userID, out string uui); |
44 | string GetUserServerURL(UUID uuid, string serverType); | 44 | string GetUserServerURL(UUID uuid, string serverType); |
45 | Dictionary<UUID,string> GetUsersNames(string[] ids); | 45 | Dictionary<UUID,string> GetUsersNames(string[] ids, UUID scopeID); |
46 | 46 | ||
47 | /// <summary> | 47 | /// <summary> |
48 | /// Get user ID by the given name. | 48 | /// Get user ID by the given name. |
diff --git a/OpenSim/Services/UserAccountService/UserAccountService.cs b/OpenSim/Services/UserAccountService/UserAccountService.cs index 24f436d..9ac8418 100644 --- a/OpenSim/Services/UserAccountService/UserAccountService.cs +++ b/OpenSim/Services/UserAccountService/UserAccountService.cs | |||
@@ -26,6 +26,7 @@ | |||
26 | */ | 26 | */ |
27 | 27 | ||
28 | using System; | 28 | using System; |
29 | using System.Linq; | ||
29 | using System.Collections.Generic; | 30 | using System.Collections.Generic; |
30 | using System.Reflection; | 31 | using System.Reflection; |
31 | using log4net; | 32 | using log4net; |
@@ -292,15 +293,8 @@ namespace OpenSim.Services.UserAccountService | |||
292 | 293 | ||
293 | public List<UserAccount> GetUserAccounts(UUID scopeID, List<string> IDs) | 294 | public List<UserAccount> GetUserAccounts(UUID scopeID, List<string> IDs) |
294 | { | 295 | { |
295 | // do it one at a time db access should be fast, so no need to break its api | 296 | UserAccountData[] ret = m_Database.GetUsersWhere(scopeID, "PrincipalID in ('" + String.Join("', '", IDs) + "')"); |
296 | List<UserAccount> accs = new List<UserAccount>(); | 297 | return new List<UserAccount>(ret.Select((x) => MakeUserAccount(x))); |
297 | UUID uuid = UUID.Zero; | ||
298 | foreach(string id in IDs) | ||
299 | { | ||
300 | if (UUID.TryParse(id, out uuid) && uuid != UUID.Zero) | ||
301 | accs.Add(GetUserAccount(scopeID, uuid)); | ||
302 | } | ||
303 | return accs; | ||
304 | } | 298 | } |
305 | 299 | ||
306 | public void InvalidateCache(UUID userID) | 300 | public void InvalidateCache(UUID userID) |