aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Services/UserAccountService
diff options
context:
space:
mode:
authorMelanie2009-12-31 01:34:03 +0000
committerMelanie2009-12-31 01:34:03 +0000
commit99ad7aac7f854eaae075e93880c39796183ba7e4 (patch)
treef433ba30315e528bc4c4df6619f2309afb45a29f /OpenSim/Services/UserAccountService
parentRemove CreateUserAccount. Rename SetUserAccount to StoreUserAccount. (diff)
downloadopensim-SC_OLD-99ad7aac7f854eaae075e93880c39796183ba7e4.zip
opensim-SC_OLD-99ad7aac7f854eaae075e93880c39796183ba7e4.tar.gz
opensim-SC_OLD-99ad7aac7f854eaae075e93880c39796183ba7e4.tar.bz2
opensim-SC_OLD-99ad7aac7f854eaae075e93880c39796183ba7e4.tar.xz
Implement saving user account data
Diffstat (limited to 'OpenSim/Services/UserAccountService')
-rw-r--r--OpenSim/Services/UserAccountService/UserAccountService.cs23
1 files changed, 22 insertions, 1 deletions
diff --git a/OpenSim/Services/UserAccountService/UserAccountService.cs b/OpenSim/Services/UserAccountService/UserAccountService.cs
index 706da84..2954589 100644
--- a/OpenSim/Services/UserAccountService/UserAccountService.cs
+++ b/OpenSim/Services/UserAccountService/UserAccountService.cs
@@ -142,7 +142,28 @@ namespace OpenSim.Services.UserAccountService
142 142
143 public bool StoreUserAccount(UserAccount data) 143 public bool StoreUserAccount(UserAccount data)
144 { 144 {
145 return false; 145 UserAccountData d = new UserAccountData();
146
147 d.FirstName = data.FirstName;
148 d.LastName = data.LastName;
149 d.PrincipalID = data.PrincipalID;
150 d.ScopeID = data.ScopeID;
151 d.Data = new Dictionary<string,string>();
152 d.Data["Email"] = data.Email;
153 d.Data["Created"] = data.Created.ToString();
154
155 List<string> parts = new List<string>();
156
157 foreach (KeyValuePair<string,object> kvp in data.ServiceURLs)
158 {
159 string key = System.Web.HttpUtility.UrlEncode(kvp.Key);
160 string val = System.Web.HttpUtility.UrlEncode(kvp.Value.ToString());
161 parts.Add(key + "=" + val);
162 }
163
164 d.Data["ServiceURLs"] = string.Join(" ", parts.ToArray());
165
166 return m_Database.Store(d);
146 } 167 }
147 168
148 public List<UserAccount> GetUserAccounts(UUID scopeID, string query) 169 public List<UserAccount> GetUserAccounts(UUID scopeID, string query)