diff options
Diffstat (limited to 'OpenSim/Region/CoreModules/ServiceConnectorsOut/UserAccounts/LocalUserAccountServiceConnector.cs')
-rw-r--r-- | OpenSim/Region/CoreModules/ServiceConnectorsOut/UserAccounts/LocalUserAccountServiceConnector.cs | 28 |
1 files changed, 17 insertions, 11 deletions
diff --git a/OpenSim/Region/CoreModules/ServiceConnectorsOut/UserAccounts/LocalUserAccountServiceConnector.cs b/OpenSim/Region/CoreModules/ServiceConnectorsOut/UserAccounts/LocalUserAccountServiceConnector.cs index 30ebb21..0a0ce3c 100644 --- a/OpenSim/Region/CoreModules/ServiceConnectorsOut/UserAccounts/LocalUserAccountServiceConnector.cs +++ b/OpenSim/Region/CoreModules/ServiceConnectorsOut/UserAccounts/LocalUserAccountServiceConnector.cs | |||
@@ -45,7 +45,12 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.UserAccounts | |||
45 | LogManager.GetLogger( | 45 | LogManager.GetLogger( |
46 | MethodBase.GetCurrentMethod().DeclaringType); | 46 | MethodBase.GetCurrentMethod().DeclaringType); |
47 | 47 | ||
48 | private IUserAccountService m_UserService; | 48 | /// <summary> |
49 | /// This is not on the IUserAccountService. It's only being used so that standalone scenes can punch through | ||
50 | /// to a local UserAccountService when setting up an estate manager. | ||
51 | /// </summary> | ||
52 | public IUserAccountService UserAccountService { get; private set; } | ||
53 | |||
49 | private UserAccountCache m_Cache; | 54 | private UserAccountCache m_Cache; |
50 | 55 | ||
51 | private bool m_Enabled = false; | 56 | private bool m_Enabled = false; |
@@ -86,9 +91,9 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.UserAccounts | |||
86 | } | 91 | } |
87 | 92 | ||
88 | Object[] args = new Object[] { source }; | 93 | Object[] args = new Object[] { source }; |
89 | m_UserService = ServerUtils.LoadPlugin<IUserAccountService>(serviceDll, args); | 94 | UserAccountService = ServerUtils.LoadPlugin<IUserAccountService>(serviceDll, args); |
90 | 95 | ||
91 | if (m_UserService == null) | 96 | if (UserAccountService == null) |
92 | { | 97 | { |
93 | m_log.ErrorFormat( | 98 | m_log.ErrorFormat( |
94 | "[LOCAL USER ACCOUNT SERVICE CONNECTOR]: Cannot load user account service specified as {0}", serviceDll); | 99 | "[LOCAL USER ACCOUNT SERVICE CONNECTOR]: Cannot load user account service specified as {0}", serviceDll); |
@@ -119,7 +124,9 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.UserAccounts | |||
119 | if (!m_Enabled) | 124 | if (!m_Enabled) |
120 | return; | 125 | return; |
121 | 126 | ||
122 | scene.RegisterModuleInterface<IUserAccountService>(m_UserService); | 127 | // FIXME: Why do we bother setting this module and caching up if we just end up registering the inner |
128 | // user account service?! | ||
129 | scene.RegisterModuleInterface<IUserAccountService>(UserAccountService); | ||
123 | } | 130 | } |
124 | 131 | ||
125 | public void RemoveRegion(Scene scene) | 132 | public void RemoveRegion(Scene scene) |
@@ -147,7 +154,7 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.UserAccounts | |||
147 | if (inCache) | 154 | if (inCache) |
148 | return account; | 155 | return account; |
149 | 156 | ||
150 | account = m_UserService.GetUserAccount(scopeID, userID); | 157 | account = UserAccountService.GetUserAccount(scopeID, userID); |
151 | m_Cache.Cache(userID, account); | 158 | m_Cache.Cache(userID, account); |
152 | 159 | ||
153 | return account; | 160 | return account; |
@@ -160,7 +167,7 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.UserAccounts | |||
160 | if (inCache) | 167 | if (inCache) |
161 | return account; | 168 | return account; |
162 | 169 | ||
163 | account = m_UserService.GetUserAccount(scopeID, firstName, lastName); | 170 | account = UserAccountService.GetUserAccount(scopeID, firstName, lastName); |
164 | if (account != null) | 171 | if (account != null) |
165 | m_Cache.Cache(account.PrincipalID, account); | 172 | m_Cache.Cache(account.PrincipalID, account); |
166 | 173 | ||
@@ -169,22 +176,21 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.UserAccounts | |||
169 | 176 | ||
170 | public UserAccount GetUserAccount(UUID scopeID, string Email) | 177 | public UserAccount GetUserAccount(UUID scopeID, string Email) |
171 | { | 178 | { |
172 | return m_UserService.GetUserAccount(scopeID, Email); | 179 | return UserAccountService.GetUserAccount(scopeID, Email); |
173 | } | 180 | } |
174 | 181 | ||
175 | public List<UserAccount> GetUserAccounts(UUID scopeID, string query) | 182 | public List<UserAccount> GetUserAccounts(UUID scopeID, string query) |
176 | { | 183 | { |
177 | return m_UserService.GetUserAccounts(scopeID, query); | 184 | return UserAccountService.GetUserAccounts(scopeID, query); |
178 | } | 185 | } |
179 | 186 | ||
180 | // Update all updatable fields | 187 | // Update all updatable fields |
181 | // | 188 | // |
182 | public bool StoreUserAccount(UserAccount data) | 189 | public bool StoreUserAccount(UserAccount data) |
183 | { | 190 | { |
184 | return m_UserService.StoreUserAccount(data); | 191 | return UserAccountService.StoreUserAccount(data); |
185 | } | 192 | } |
186 | 193 | ||
187 | #endregion | 194 | #endregion |
188 | |||
189 | } | 195 | } |
190 | } | 196 | } \ No newline at end of file |