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.

0.8.1-post-fixes
AliciaRaven 2015-01-21 00:42:46 +00:00 committed by Justin Clark-Casey (justincc)
parent d9bfc710c0
commit abf1836b81
1 changed files with 3 additions and 3 deletions

View File

@ -196,6 +196,9 @@ namespace OpenSim.Services.ProfilesService
public bool UserPreferencesRequest(ref UserPreferences pref, ref string result)
{
if (!ProfilesData.GetUserPreferences(ref pref, ref result))
return false;
if(string.IsNullOrEmpty(pref.EMail))
{
UserAccount account = new UserAccount();
@ -228,9 +231,6 @@ namespace OpenSim.Services.ProfilesService
return false;
}
}
if (!ProfilesData.GetUserPreferences (ref pref, ref result))
return false;
if(string.IsNullOrEmpty(pref.EMail))
pref.EMail = "No Email Address On Record";