diff options
author | Melanie | 2014-01-05 20:12:32 +0000 |
---|---|---|
committer | Melanie | 2014-01-05 20:12:32 +0000 |
commit | e79fab91dbe731e9d177de61993d963bcc067299 (patch) | |
tree | 4358fd508e55dd91774ba83b8e4c30fc24f452c7 /OpenSim/Services/UserProfilesService | |
parent | Merge commit '92aad6f1bb45974927fa43d6fd30f98337dee3f0' into careminster (diff) | |
parent | Some missing definitions needed for successful compilation. (diff) | |
download | opensim-SC-e79fab91dbe731e9d177de61993d963bcc067299.zip opensim-SC-e79fab91dbe731e9d177de61993d963bcc067299.tar.gz opensim-SC-e79fab91dbe731e9d177de61993d963bcc067299.tar.bz2 opensim-SC-e79fab91dbe731e9d177de61993d963bcc067299.tar.xz |
Intermediate commit. Sill errors.
Merge branch 'master' into careminster
Conflicts:
OpenSim/Data/SQLite/SQLiteUserProfilesData.cs
OpenSim/Framework/RegionInfo.cs
OpenSim/Region/ClientStack/Linden/Caps/EventQueue/EventQueueHelper.cs
OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs
OpenSim/Services/UserProfilesService/UserProfilesService.cs
Diffstat (limited to 'OpenSim/Services/UserProfilesService')
-rw-r--r-- | OpenSim/Services/UserProfilesService/UserProfilesService.cs | 73 |
1 files changed, 73 insertions, 0 deletions
diff --git a/OpenSim/Services/UserProfilesService/UserProfilesService.cs b/OpenSim/Services/UserProfilesService/UserProfilesService.cs index d00f34d..dd26cdc 100644 --- a/OpenSim/Services/UserProfilesService/UserProfilesService.cs +++ b/OpenSim/Services/UserProfilesService/UserProfilesService.cs | |||
@@ -37,6 +37,7 @@ using OpenSim.Data; | |||
37 | using OpenMetaverse; | 37 | using OpenMetaverse; |
38 | using OpenMetaverse.StructuredData; | 38 | using OpenMetaverse.StructuredData; |
39 | using OpenSim.Framework; | 39 | using OpenSim.Framework; |
40 | using OpenSim.Services.UserAccountService; | ||
40 | 41 | ||
41 | namespace OpenSim.Services.ProfilesService | 42 | namespace OpenSim.Services.ProfilesService |
42 | { | 43 | { |
@@ -163,6 +164,78 @@ namespace OpenSim.Services.ProfilesService | |||
163 | } | 164 | } |
164 | #endregion Interests | 165 | #endregion Interests |
165 | 166 | ||
167 | #region User Preferences | ||
168 | public bool UserPreferencesUpdate(ref UserPreferences pref, ref string result) | ||
169 | { | ||
170 | if(string.IsNullOrEmpty(pref.EMail)) | ||
171 | { | ||
172 | UserAccount account = new UserAccount(); | ||
173 | if(userAccounts is UserAccountService.UserAccountService) | ||
174 | { | ||
175 | try | ||
176 | { | ||
177 | account = userAccounts.GetUserAccount(UUID.Zero, pref.UserId); | ||
178 | if(string.IsNullOrEmpty(account.Email)) | ||
179 | { | ||
180 | result = "No Email address on record!"; | ||
181 | return false; | ||
182 | } | ||
183 | else | ||
184 | pref.EMail = account.Email; | ||
185 | } | ||
186 | catch | ||
187 | { | ||
188 | m_log.Info ("[PROFILES]: UserAccountService Exception: Could not get user account"); | ||
189 | result = "Missing Email address!"; | ||
190 | return false; | ||
191 | } | ||
192 | } | ||
193 | else | ||
194 | { | ||
195 | m_log.Info ("[PROFILES]: UserAccountService: Could not get user account"); | ||
196 | result = "Missing Email address!"; | ||
197 | return false; | ||
198 | } | ||
199 | } | ||
200 | return ProfilesData.UpdateUserPreferences(ref pref, ref result); | ||
201 | } | ||
202 | |||
203 | public bool UserPreferencesRequest(ref UserPreferences pref, ref string result) | ||
204 | { | ||
205 | if(string.IsNullOrEmpty(pref.EMail)) | ||
206 | { | ||
207 | UserAccount account = new UserAccount(); | ||
208 | if(userAccounts is UserAccountService.UserAccountService) | ||
209 | { | ||
210 | try | ||
211 | { | ||
212 | account = userAccounts.GetUserAccount(UUID.Zero, pref.UserId); | ||
213 | if(string.IsNullOrEmpty(account.Email)) | ||
214 | { | ||
215 | result = "No Email address on record!"; | ||
216 | return false; | ||
217 | } | ||
218 | else | ||
219 | pref.EMail = account.Email; | ||
220 | } | ||
221 | catch | ||
222 | { | ||
223 | m_log.Info ("[PROFILES]: UserAccountService Exception: Could not get user account"); | ||
224 | result = "Missing Email address!"; | ||
225 | return false; | ||
226 | } | ||
227 | } | ||
228 | else | ||
229 | { | ||
230 | m_log.Info ("[PROFILES]: UserAccountService: Could not get user account"); | ||
231 | result = "Missing Email address!"; | ||
232 | return false; | ||
233 | } | ||
234 | } | ||
235 | return ProfilesData.GetUserPreferences(ref pref, ref result); | ||
236 | } | ||
237 | #endregion User Preferences | ||
238 | |||
166 | #region Utility | 239 | #region Utility |
167 | public OSD AvatarImageAssetsRequest(UUID avatarId) | 240 | public OSD AvatarImageAssetsRequest(UUID avatarId) |
168 | { | 241 | { |