From c5594e839e55beb72f9132ebe29a877f62f99138 Mon Sep 17 00:00:00 2001 From: BlueWall Date: Thu, 12 Jan 2012 21:19:31 -0500 Subject: [PATCH] Undo some prior work Move some added fuctions out of core into the addon module to keep things clean --- .../UserManagement/UserManagementModule.cs | 93 ------------------- .../Framework/Interfaces/IUserManagement.cs | 3 - 2 files changed, 96 deletions(-) diff --git a/OpenSim/Region/CoreModules/Framework/UserManagement/UserManagementModule.cs b/OpenSim/Region/CoreModules/Framework/UserManagement/UserManagementModule.cs index 80ab30c3ef..bbdf92a820 100644 --- a/OpenSim/Region/CoreModules/Framework/UserManagement/UserManagementModule.cs +++ b/OpenSim/Region/CoreModules/Framework/UserManagement/UserManagementModule.cs @@ -50,9 +50,6 @@ namespace OpenSim.Region.CoreModules.Framework.UserManagement public string LastName { get; set; } public string HomeURL { get; set; } public Dictionary ServerURLs { get; set; } - public string Title { get; set; } - public int Flags { get; set; } - public int Created { get; set; } } public class UserManagementModule : ISharedRegionModule, IUserManagement @@ -284,94 +281,6 @@ namespace OpenSim.Region.CoreModules.Framework.UserManagement return string.Empty; } - public int GetUserFlags(UUID userID) - { - UserData userdata; - lock (m_UserCache) - m_UserCache.TryGetValue(userID, out userdata); - - if (userdata.Flags == -1) - GetUserInfo(userID); - - if (userdata.Flags != -1) - return userdata.Flags; - - return 0; - } - - public int GetUserCreated(UUID userID) - { - UserData userdata; - lock (m_UserCache) - m_UserCache.TryGetValue(userID, out userdata); - - if (userdata.Flags == -1) - GetUserInfo(userID); - - if (userdata.Created != -1) - return userdata.Created; - - return 0; - } - - public string GetUserTitle(UUID userID) - { - UserData userdata; - lock (m_UserCache) - m_UserCache.TryGetValue(userID, out userdata); - - if (userdata.Flags == -1) - GetUserInfo(userID); - - if (userdata.Created != -1) - return userdata.Title; - - return string.Empty; - } - - // This will cache the user data - // Change this to return bool - private bool GetUserInfo(UUID userID) - { - UserData userdata; - lock (m_UserCache) - m_UserCache.TryGetValue(userID, out userdata); - - if (userdata != null) - { -// m_log.DebugFormat("[USER MANAGEMENT MODULE]: Requested url type {0} for {1}", serverType, userID); - - if (userdata.Flags >= 0) - { - // This is already populated - return true; - } - - if (userdata.HomeURL != null && userdata.HomeURL != string.Empty) - { - m_log.DebugFormat( - "[USER MANAGEMENT MODULE]: Requesting user flags from '{0}' for {1}", - userdata.HomeURL, userID); - - UserAgentServiceConnector uConn = new UserAgentServiceConnector(userdata.HomeURL); - Dictionary info = uConn.GetUserInfo(userID); - - // Pull our data now - if (info["result"].ToString() == "success") - { - userdata.Flags = (int)info["user_flags"]; - userdata.Created = (int)info["user_created"]; - userdata.Title = (string)info["user_title"]; - - return true; - } - } - } - - return false; - } - - public string GetUserUUI(UUID userID) { UserAccount account = m_Scenes[0].UserAccountService.GetUserAccount(m_Scenes[0].RegionInfo.ScopeID, userID); @@ -452,8 +361,6 @@ namespace OpenSim.Region.CoreModules.Framework.UserManagement } else { UserData user = new UserData (); user.Id = id; - user.Flags = -1; - user.Created = -1; if (creatorData != null && creatorData != string.Empty) { //creatorData = ; diff --git a/OpenSim/Region/Framework/Interfaces/IUserManagement.cs b/OpenSim/Region/Framework/Interfaces/IUserManagement.cs index 4f62e28789..bfb8369437 100644 --- a/OpenSim/Region/Framework/Interfaces/IUserManagement.cs +++ b/OpenSim/Region/Framework/Interfaces/IUserManagement.cs @@ -14,9 +14,6 @@ namespace OpenSim.Region.Framework.Interfaces string GetUserHomeURL(UUID uuid); string GetUserUUI(UUID uuid); string GetUserServerURL(UUID uuid, string serverType); - int GetUserFlags(UUID userID); - int GetUserCreated(UUID userID); - string GetUserTitle(UUID userID); /// /// Add a user.