aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Server/Handlers/UserAccounts
diff options
context:
space:
mode:
authorMelanie2009-12-31 01:16:16 +0000
committerMelanie2009-12-31 01:16:16 +0000
commit3507005d9decdbf579fb2b7b9928a7d97bd6cf5b (patch)
treed4b6c1ed6928f54fedb3dd0bf5371c7c38a66c55 /OpenSim/Server/Handlers/UserAccounts
parentMake ScopeID be wild on user queries. Just pass it as UUID.Zero (diff)
downloadopensim-SC_OLD-3507005d9decdbf579fb2b7b9928a7d97bd6cf5b.zip
opensim-SC_OLD-3507005d9decdbf579fb2b7b9928a7d97bd6cf5b.tar.gz
opensim-SC_OLD-3507005d9decdbf579fb2b7b9928a7d97bd6cf5b.tar.bz2
opensim-SC_OLD-3507005d9decdbf579fb2b7b9928a7d97bd6cf5b.tar.xz
Remove CreateUserAccount. Rename SetUserAccount to StoreUserAccount.
Implement the fetch operations fully. Rename one last UserService file to UserAccountService
Diffstat (limited to 'OpenSim/Server/Handlers/UserAccounts')
-rw-r--r--OpenSim/Server/Handlers/UserAccounts/UserAccountServerPostHandler.cs25
1 files changed, 3 insertions, 22 deletions
diff --git a/OpenSim/Server/Handlers/UserAccounts/UserAccountServerPostHandler.cs b/OpenSim/Server/Handlers/UserAccounts/UserAccountServerPostHandler.cs
index a92148c..544ffea 100644
--- a/OpenSim/Server/Handlers/UserAccounts/UserAccountServerPostHandler.cs
+++ b/OpenSim/Server/Handlers/UserAccounts/UserAccountServerPostHandler.cs
@@ -85,10 +85,8 @@ namespace OpenSim.Server.Handlers.UserAccounts
85 return GetAccount(request); 85 return GetAccount(request);
86 case "getaccounts": 86 case "getaccounts":
87 return GetAccounts(request); 87 return GetAccounts(request);
88 case "createaccount":
89 return CreateAccount(request);
90 case "setaccount": 88 case "setaccount":
91 return SetAccount(request); 89 return StoreAccount(request);
92 } 90 }
93 m_log.DebugFormat("[PRESENCE HANDLER]: unknown method request: {0}", method); 91 m_log.DebugFormat("[PRESENCE HANDLER]: unknown method request: {0}", method);
94 } 92 }
@@ -174,24 +172,7 @@ namespace OpenSim.Server.Handlers.UserAccounts
174 return encoding.GetBytes(xmlString); 172 return encoding.GetBytes(xmlString);
175 } 173 }
176 174
177 byte[] CreateAccount(Dictionary<string, object> request) 175 byte[] StoreAccount(Dictionary<string, object> request)
178 {
179 if (!request.ContainsKey("account"))
180 return FailureResult();
181 if (request["account"] == null)
182 return FailureResult();
183 if (!(request["account"] is Dictionary<string, object>))
184 return FailureResult();
185
186 UserAccount account = new UserAccount((Dictionary<string, object>) request["account"]);
187
188 if (m_UserAccountService.CreateUserAccount(account))
189 return SuccessResult();
190
191 return FailureResult();
192 }
193
194 byte[] SetAccount(Dictionary<string, object> request)
195 { 176 {
196 if (!request.ContainsKey("account")) 177 if (!request.ContainsKey("account"))
197 return FailureResult(); 178 return FailureResult();
@@ -202,7 +183,7 @@ namespace OpenSim.Server.Handlers.UserAccounts
202 183
203 UserAccount account = new UserAccount((Dictionary<string, object>)request["account"]); 184 UserAccount account = new UserAccount((Dictionary<string, object>)request["account"]);
204 185
205 if (m_UserAccountService.SetUserAccount(account)) 186 if (m_UserAccountService.StoreUserAccount(account))
206 return SuccessResult(); 187 return SuccessResult();
207 188
208 return FailureResult(); 189 return FailureResult();