From 12108bf6e9dc16b6b4b1fe344c1b12ed31a1e4b4 Mon Sep 17 00:00:00 2001 From: BlueWall Date: Sun, 23 Nov 2014 14:25:48 -0500 Subject: Fix handling of user preference updates where no email address is supplied --- .../UserProfilesService/UserProfilesService.cs | 28 +++++++++------------- .../UserProfilesService/UserProfilesServiceBase.cs | 2 +- 2 files changed, 12 insertions(+), 18 deletions(-) (limited to 'OpenSim/Services/UserProfilesService') diff --git a/OpenSim/Services/UserProfilesService/UserProfilesService.cs b/OpenSim/Services/UserProfilesService/UserProfilesService.cs index c752055..675cd07 100644 --- a/OpenSim/Services/UserProfilesService/UserProfilesService.cs +++ b/OpenSim/Services/UserProfilesService/UserProfilesService.cs @@ -47,7 +47,6 @@ namespace OpenSim.Services.ProfilesService MethodBase.GetCurrentMethod().DeclaringType); IUserAccountService userAccounts; - IAuthenticationService authService; public UserProfilesService(IConfigSource config, string configName): base(config, configName) @@ -55,7 +54,7 @@ namespace OpenSim.Services.ProfilesService IConfig Config = config.Configs[configName]; if (Config == null) { - m_log.Warn("[PROFILES]: No configuration found!"); + m_log.Warn("[PROFILES SERVICE]: No configuration found!"); return; } Object[] args = null; @@ -66,9 +65,6 @@ namespace OpenSim.Services.ProfilesService userAccounts = ServerUtils.LoadPlugin(accountService, args); args = new Object[] { config }; - string authServiceConfig = Config.GetString("AuthenticationServiceModule", String.Empty); - if (accountService != string.Empty) - authService = ServerUtils.LoadPlugin(authServiceConfig, args); } #region Classifieds @@ -176,23 +172,22 @@ namespace OpenSim.Services.ProfilesService account = userAccounts.GetUserAccount(UUID.Zero, pref.UserId); if(string.IsNullOrEmpty(account.Email)) { - result = "No Email address on record!"; - return false; + pref.EMail = string.Empty; } else pref.EMail = account.Email; } catch { - m_log.Info ("[PROFILES]: UserAccountService Exception: Could not get user account"); - result = "Missing Email address!"; + m_log.Error ("[PROFILES SERVICE]: UserAccountService Exception: Could not get user account"); + result = "UserAccountService settings error in UserProfileService!"; return false; } } else { - m_log.Info ("[PROFILES]: UserAccountService: Could not get user account"); - result = "Missing Email address!"; + m_log.Error ("[PROFILES SERVICE]: UserAccountService: Could not get user account"); + result = "UserAccountService settings error in UserProfileService!"; return false; } } @@ -211,23 +206,22 @@ namespace OpenSim.Services.ProfilesService account = userAccounts.GetUserAccount(UUID.Zero, pref.UserId); if(string.IsNullOrEmpty(account.Email)) { - result = "No Email address on record!"; - return false; + pref.EMail = string.Empty; } else pref.EMail = account.Email; } catch { - m_log.Info ("[PROFILES]: UserAccountService Exception: Could not get user account"); - result = "Missing Email address!"; + m_log.Error ("[PROFILES SERVICE]: UserAccountService Exception: Could not get user account"); + result = "UserAccountService settings error in UserProfileService!"; return false; } } else { - m_log.Info ("[PROFILES]: UserAccountService: Could not get user account"); - result = "Missing Email address!"; + m_log.Error ("[PROFILES SERVICE]: UserAccountService: Could not get user account"); + result = "UserAccountService settings error in UserProfileService!"; return false; } } diff --git a/OpenSim/Services/UserProfilesService/UserProfilesServiceBase.cs b/OpenSim/Services/UserProfilesService/UserProfilesServiceBase.cs index bc24ec2..c31578f 100644 --- a/OpenSim/Services/UserProfilesService/UserProfilesServiceBase.cs +++ b/OpenSim/Services/UserProfilesService/UserProfilesServiceBase.cs @@ -52,7 +52,7 @@ namespace OpenSim.Services.ProfilesService { if(string.IsNullOrEmpty(configName)) { - m_log.WarnFormat("[PROFILES]: Configuration section not given!"); + m_log.WarnFormat("[PROFILES SERVICE]: Configuration section not given!"); return; } -- cgit v1.1