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.
parent
d9bfc710c0
commit
abf1836b81
|
@ -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";
|
||||
|
|
Loading…
Reference in New Issue