Fix scope support to get friends list names across co-hosted grids

This commit is contained in:
Melanie
2019-08-07 17:58:08 +01:00
parent 24aa13239c
commit d781742d8e
7 changed files with 37 additions and 20 deletions

View File

@@ -26,6 +26,7 @@
*/
using System;
using System.Linq;
using System.Collections.Generic;
using System.Reflection;
using log4net;
@@ -292,15 +293,8 @@ namespace OpenSim.Services.UserAccountService
public List<UserAccount> GetUserAccounts(UUID scopeID, List<string> IDs)
{
// do it one at a time db access should be fast, so no need to break its api
List<UserAccount> accs = new List<UserAccount>();
UUID uuid = UUID.Zero;
foreach(string id in IDs)
{
if (UUID.TryParse(id, out uuid) && uuid != UUID.Zero)
accs.Add(GetUserAccount(scopeID, uuid));
}
return accs;
UserAccountData[] ret = m_Database.GetUsersWhere(scopeID, "PrincipalID in ('" + String.Join("', '", IDs) + "')");
return new List<UserAccount>(ret.Select((x) => MakeUserAccount(x)));
}
public void InvalidateCache(UUID userID)