aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Server/Handlers/UserAccounts/UserAccountServerPostHandler.cs
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Server/Handlers/UserAccounts/UserAccountServerPostHandler.cs')
-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();