aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/CoreModules/ServiceConnectorsOut/UserAccounts/LocalUserAccountServiceConnector.cs
diff options
context:
space:
mode:
authorJohn Hurliman2010-03-10 14:06:12 -0800
committerJohn Hurliman2010-03-10 14:06:12 -0800
commitb18ca2fee6624d63faf0d44dd2d4b7b64c93fc5a (patch)
treec20d8f5be598d70caff0589629427f6450573cf4 /OpenSim/Region/CoreModules/ServiceConnectorsOut/UserAccounts/LocalUserAccountServiceConnector.cs
parent* Cleaned up and commented the messy SendInventoryUpdate, fixed a broken debu... (diff)
parentReintroduce a check that was dropped from permissions (diff)
downloadopensim-SC_OLD-b18ca2fee6624d63faf0d44dd2d4b7b64c93fc5a.zip
opensim-SC_OLD-b18ca2fee6624d63faf0d44dd2d4b7b64c93fc5a.tar.gz
opensim-SC_OLD-b18ca2fee6624d63faf0d44dd2d4b7b64c93fc5a.tar.bz2
opensim-SC_OLD-b18ca2fee6624d63faf0d44dd2d4b7b64c93fc5a.tar.xz
Merge branch 'master' of ssh://opensimulator.org/var/git/opensim
Diffstat (limited to '')
-rw-r--r--OpenSim/Region/CoreModules/ServiceConnectorsOut/UserAccounts/LocalUserAccountServiceConnector.cs15
1 files changed, 8 insertions, 7 deletions
diff --git a/OpenSim/Region/CoreModules/ServiceConnectorsOut/UserAccounts/LocalUserAccountServiceConnector.cs b/OpenSim/Region/CoreModules/ServiceConnectorsOut/UserAccounts/LocalUserAccountServiceConnector.cs
index 07fee79..ce0ca40 100644
--- a/OpenSim/Region/CoreModules/ServiceConnectorsOut/UserAccounts/LocalUserAccountServiceConnector.cs
+++ b/OpenSim/Region/CoreModules/ServiceConnectorsOut/UserAccounts/LocalUserAccountServiceConnector.cs
@@ -142,26 +142,27 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.UserAccounts
142 142
143 public UserAccount GetUserAccount(UUID scopeID, UUID userID) 143 public UserAccount GetUserAccount(UUID scopeID, UUID userID)
144 { 144 {
145 UserAccount account = m_Cache.Get(userID); 145 bool inCache = false;
146 if (account != null) 146 UserAccount account = m_Cache.Get(userID, out inCache);
147 if (inCache)
147 return account; 148 return account;
148 149
149 account = m_UserService.GetUserAccount(scopeID, userID); 150 account = m_UserService.GetUserAccount(scopeID, userID);
150 if (account != null) 151 m_Cache.Cache(userID, account);
151 m_Cache.Cache(account);
152 152
153 return account; 153 return account;
154 } 154 }
155 155
156 public UserAccount GetUserAccount(UUID scopeID, string firstName, string lastName) 156 public UserAccount GetUserAccount(UUID scopeID, string firstName, string lastName)
157 { 157 {
158 UserAccount account = m_Cache.Get(firstName + " " + lastName); 158 bool inCache = false;
159 if (account != null) 159 UserAccount account = m_Cache.Get(firstName + " " + lastName, out inCache);
160 if (inCache)
160 return account; 161 return account;
161 162
162 account = m_UserService.GetUserAccount(scopeID, firstName, lastName); 163 account = m_UserService.GetUserAccount(scopeID, firstName, lastName);
163 if (account != null) 164 if (account != null)
164 m_Cache.Cache(account); 165 m_Cache.Cache(account.PrincipalID, account);
165 166
166 return account; 167 return account;
167 } 168 }