diff options
Diffstat (limited to 'OpenSim/Services/UserAccountService/UserAccountService.cs')
-rw-r--r-- | OpenSim/Services/UserAccountService/UserAccountService.cs | 24 |
1 files changed, 22 insertions, 2 deletions
diff --git a/OpenSim/Services/UserAccountService/UserAccountService.cs b/OpenSim/Services/UserAccountService/UserAccountService.cs index 5b4d040..772ab97 100644 --- a/OpenSim/Services/UserAccountService/UserAccountService.cs +++ b/OpenSim/Services/UserAccountService/UserAccountService.cs | |||
@@ -36,6 +36,7 @@ using OpenSim.Framework; | |||
36 | using OpenSim.Services.Interfaces; | 36 | using OpenSim.Services.Interfaces; |
37 | using OpenSim.Framework.Console; | 37 | using OpenSim.Framework.Console; |
38 | using GridRegion = OpenSim.Services.Interfaces.GridRegion; | 38 | using GridRegion = OpenSim.Services.Interfaces.GridRegion; |
39 | using PermissionMask = OpenSim.Framework.PermissionMask; | ||
39 | 40 | ||
40 | namespace OpenSim.Services.UserAccountService | 41 | namespace OpenSim.Services.UserAccountService |
41 | { | 42 | { |
@@ -170,6 +171,10 @@ namespace OpenSim.Services.UserAccountService | |||
170 | Int32.TryParse(d.Data["UserLevel"], out u.UserLevel); | 171 | Int32.TryParse(d.Data["UserLevel"], out u.UserLevel); |
171 | if (d.Data.ContainsKey("UserFlags") && d.Data["UserFlags"] != null) | 172 | if (d.Data.ContainsKey("UserFlags") && d.Data["UserFlags"] != null) |
172 | Int32.TryParse(d.Data["UserFlags"], out u.UserFlags); | 173 | Int32.TryParse(d.Data["UserFlags"], out u.UserFlags); |
174 | if (d.Data.ContainsKey("UserCountry") && d.Data["UserCountry"] != null) | ||
175 | u.UserCountry = d.Data["UserCountry"].ToString(); | ||
176 | else | ||
177 | u.UserTitle = string.Empty; | ||
173 | 178 | ||
174 | if (d.Data.ContainsKey("ServiceURLs") && d.Data["ServiceURLs"] != null) | 179 | if (d.Data.ContainsKey("ServiceURLs") && d.Data["ServiceURLs"] != null) |
175 | { | 180 | { |
@@ -291,7 +296,22 @@ namespace OpenSim.Services.UserAccountService | |||
291 | 296 | ||
292 | public List<UserAccount> GetUserAccounts(UUID scopeID, string query) | 297 | public List<UserAccount> GetUserAccounts(UUID scopeID, string query) |
293 | { | 298 | { |
294 | UserAccountData[] d = m_Database.GetUsers(scopeID, query); | 299 | UserAccountData[] d = m_Database.GetUsers(scopeID, query.Trim()); |
300 | |||
301 | if (d == null) | ||
302 | return new List<UserAccount>(); | ||
303 | |||
304 | List<UserAccount> ret = new List<UserAccount>(); | ||
305 | |||
306 | foreach (UserAccountData data in d) | ||
307 | ret.Add(MakeUserAccount(data)); | ||
308 | |||
309 | return ret; | ||
310 | } | ||
311 | |||
312 | public List<UserAccount> GetUserAccountsWhere(UUID scopeID, string where) | ||
313 | { | ||
314 | UserAccountData[] d = m_Database.GetUsersWhere(scopeID, where); | ||
295 | 315 | ||
296 | if (d == null) | 316 | if (d == null) |
297 | return new List<UserAccount>(); | 317 | return new List<UserAccount>(); |
@@ -665,4 +685,4 @@ namespace OpenSim.Services.UserAccountService | |||
665 | } | 685 | } |
666 | } | 686 | } |
667 | } | 687 | } |
668 | } \ No newline at end of file | 688 | } |