aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Services
diff options
context:
space:
mode:
authorAliciaRaven2015-01-21 00:42:46 +0000
committerJustin Clark-Casey (justincc)2015-01-21 00:57:06 +0000
commitabf1836b818e7876c3e32856b61cb1ba1f6460f2 (patch)
treeaf562da2519dfa9983065040c408bdc897439030 /OpenSim/Services
parentReplace the tabs that have crept into isolated places in config and config ex... (diff)
downloadopensim-SC_OLD-abf1836b818e7876c3e32856b61cb1ba1f6460f2.zip
opensim-SC_OLD-abf1836b818e7876c3e32856b61cb1ba1f6460f2.tar.gz
opensim-SC_OLD-abf1836b818e7876c3e32856b61cb1ba1f6460f2.tar.bz2
opensim-SC_OLD-abf1836b818e7876c3e32856b61cb1ba1f6460f2.tar.xz
Fix OfflineIMEmail value overwriting every time its called. The request was receiving a blank user prefs object to populate but then was checking for an email address. When this failed the email address was pulled from the User Account service and the empty prefs now including the email was saved before being loaded again to be returned. This was overwriting all other settings in the prefs. This fix returns the existing prefs first before checking the email address is set, and only updates email if missing.
Diffstat (limited to 'OpenSim/Services')
-rw-r--r--OpenSim/Services/UserProfilesService/UserProfilesService.cs6
1 files changed, 3 insertions, 3 deletions
diff --git a/OpenSim/Services/UserProfilesService/UserProfilesService.cs b/OpenSim/Services/UserProfilesService/UserProfilesService.cs
index 75101ff..96c13c0 100644
--- a/OpenSim/Services/UserProfilesService/UserProfilesService.cs
+++ b/OpenSim/Services/UserProfilesService/UserProfilesService.cs
@@ -196,6 +196,9 @@ namespace OpenSim.Services.ProfilesService
196 196
197 public bool UserPreferencesRequest(ref UserPreferences pref, ref string result) 197 public bool UserPreferencesRequest(ref UserPreferences pref, ref string result)
198 { 198 {
199 if (!ProfilesData.GetUserPreferences(ref pref, ref result))
200 return false;
201
199 if(string.IsNullOrEmpty(pref.EMail)) 202 if(string.IsNullOrEmpty(pref.EMail))
200 { 203 {
201 UserAccount account = new UserAccount(); 204 UserAccount account = new UserAccount();
@@ -228,9 +231,6 @@ namespace OpenSim.Services.ProfilesService
228 return false; 231 return false;
229 } 232 }
230 } 233 }
231 if (!ProfilesData.GetUserPreferences (ref pref, ref result))
232 return false;
233
234 234
235 if(string.IsNullOrEmpty(pref.EMail)) 235 if(string.IsNullOrEmpty(pref.EMail))
236 pref.EMail = "No Email Address On Record"; 236 pref.EMail = "No Email Address On Record";