* Made UserAccountService handle UserLevel, UserFlags and UserTitle appropriately.

* Removed Store service from the UserAccount handler.
slimupdates
Diva Canto 2010-04-03 12:03:34 -07:00
parent 35c82a31db
commit 6485c576a1
4 changed files with 114 additions and 118 deletions

View File

@ -176,18 +176,7 @@ namespace OpenSim.Server.Handlers.UserAccounts
byte[] StoreAccount(Dictionary<string, object> request) byte[] StoreAccount(Dictionary<string, object> request)
{ {
//if (!request.ContainsKey("account")) // No can do. No changing user accounts from remote sims
// return FailureResult();
//if (request["account"] == null)
// return FailureResult();
//if (!(request["account"] is Dictionary<string, object>))
// return FailureResult();
UserAccount account = new UserAccount(request);
if (m_UserAccountService.StoreUserAccount(account))
return SuccessResult();
return FailureResult(); return FailureResult();
} }

View File

@ -134,6 +134,10 @@ namespace OpenSim.Services.UserAccountService
u.UserTitle = d.Data["UserTitle"].ToString(); u.UserTitle = d.Data["UserTitle"].ToString();
else else
u.UserTitle = string.Empty; u.UserTitle = string.Empty;
if (d.Data.ContainsKey("UserLevel") && d.Data["UserLevel"] != null)
Int32.TryParse(d.Data["UserLevel"], out u.UserLevel);
if (d.Data.ContainsKey("UserFlags") && d.Data["UserFlags"] != null)
Int32.TryParse(d.Data["UserFlags"], out u.UserFlags);
if (d.Data.ContainsKey("ServiceURLs") && d.Data["ServiceURLs"] != null) if (d.Data.ContainsKey("ServiceURLs") && d.Data["ServiceURLs"] != null)
{ {
@ -218,6 +222,9 @@ namespace OpenSim.Services.UserAccountService
d.Data = new Dictionary<string, string>(); d.Data = new Dictionary<string, string>();
d.Data["Email"] = data.Email; d.Data["Email"] = data.Email;
d.Data["Created"] = data.Created.ToString(); d.Data["Created"] = data.Created.ToString();
d.Data["UserLevel"] = data.UserLevel.ToString();
d.Data["UserFlags"] = data.UserFlags.ToString();
d.Data["UserTitle"] = data.UserTitle.ToString();
List<string> parts = new List<string>(); List<string> parts = new List<string>();