aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/CoreModules
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Region/CoreModules')
-rw-r--r--OpenSim/Region/CoreModules/Framework/UserManagement/UserManagementModule.cs17
1 files changed, 17 insertions, 0 deletions
diff --git a/OpenSim/Region/CoreModules/Framework/UserManagement/UserManagementModule.cs b/OpenSim/Region/CoreModules/Framework/UserManagement/UserManagementModule.cs
index 7d0c47f..e1764bf 100644
--- a/OpenSim/Region/CoreModules/Framework/UserManagement/UserManagementModule.cs
+++ b/OpenSim/Region/CoreModules/Framework/UserManagement/UserManagementModule.cs
@@ -182,6 +182,8 @@ namespace OpenSim.Region.CoreModules.Framework.UserManagement
182// m_log.DebugFormat( 182// m_log.DebugFormat(
183// "[USER MANAGEMENT MODULE]: Handling request for name binding of UUID {0} from {1}", 183// "[USER MANAGEMENT MODULE]: Handling request for name binding of UUID {0} from {1}",
184// uuid, remote_client.Name); 184// uuid, remote_client.Name);
185 if(m_Scenes.Count <= 0)
186 return;
185 187
186 if (m_Scenes[0].LibraryService != null && (m_Scenes[0].LibraryService.LibraryRootFolder.Owner == uuid)) 188 if (m_Scenes[0].LibraryService != null && (m_Scenes[0].LibraryService.LibraryRootFolder.Owner == uuid))
187 { 189 {
@@ -288,6 +290,9 @@ namespace OpenSim.Region.CoreModules.Framework.UserManagement
288 290
289 public List<UserData> GetUserData(string query, int page_size, int page_number) 291 public List<UserData> GetUserData(string query, int page_size, int page_number)
290 { 292 {
293 if(m_Scenes.Count <= 0)
294 return new List<UserData>();;
295
291 // search the user accounts service 296 // search the user accounts service
292 List<UserAccount> accs = m_Scenes[0].UserAccountService.GetUserAccounts(m_Scenes[0].RegionInfo.ScopeID, query); 297 List<UserAccount> accs = m_Scenes[0].UserAccountService.GetUserAccounts(m_Scenes[0].RegionInfo.ScopeID, query);
293 298
@@ -380,6 +385,9 @@ namespace OpenSim.Region.CoreModules.Framework.UserManagement
380 /// <param name='names'>The array of names if found. If not found, then names[0] = "Unknown" and names[1] = "User"</param> 385 /// <param name='names'>The array of names if found. If not found, then names[0] = "Unknown" and names[1] = "User"</param>
381 private bool TryGetUserNamesFromServices(UUID uuid, string[] names) 386 private bool TryGetUserNamesFromServices(UUID uuid, string[] names)
382 { 387 {
388 if(m_Scenes.Count <= 0)
389 return false;
390
383 UserAccount account = m_Scenes[0].UserAccountService.GetUserAccount(UUID.Zero, uuid); 391 UserAccount account = m_Scenes[0].UserAccountService.GetUserAccount(UUID.Zero, uuid);
384 392
385 if (account != null) 393 if (account != null)
@@ -445,6 +453,9 @@ namespace OpenSim.Region.CoreModules.Framework.UserManagement
445 453
446 public UUID GetUserIdByName(string firstName, string lastName) 454 public UUID GetUserIdByName(string firstName, string lastName)
447 { 455 {
456 if(m_Scenes.Count <= 0)
457 return UUID.Zero;
458
448 // TODO: Optimize for reverse lookup if this gets used by non-console commands. 459 // TODO: Optimize for reverse lookup if this gets used by non-console commands.
449 lock (m_UserCache) 460 lock (m_UserCache)
450 { 461 {
@@ -555,6 +566,12 @@ namespace OpenSim.Region.CoreModules.Framework.UserManagement
555 #region Cache Management 566 #region Cache Management
556 public bool GetUser(UUID uuid, out UserData userdata) 567 public bool GetUser(UUID uuid, out UserData userdata)
557 { 568 {
569 if(m_Scenes.Count <= 0)
570 {
571 userdata = new UserData();
572 return false;
573 }
574
558 lock (m_UserCache) 575 lock (m_UserCache)
559 { 576 {
560 if (m_UserCache.TryGetValue(uuid, out userdata)) 577 if (m_UserCache.TryGetValue(uuid, out userdata))