aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Services/UserProfilesService
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Services/UserProfilesService')
-rw-r--r--OpenSim/Services/UserProfilesService/UserProfilesService.cs41
-rw-r--r--OpenSim/Services/UserProfilesService/UserProfilesServiceBase.cs3
2 files changed, 24 insertions, 20 deletions
diff --git a/OpenSim/Services/UserProfilesService/UserProfilesService.cs b/OpenSim/Services/UserProfilesService/UserProfilesService.cs
index 038e993..35fe31b 100644
--- a/OpenSim/Services/UserProfilesService/UserProfilesService.cs
+++ b/OpenSim/Services/UserProfilesService/UserProfilesService.cs
@@ -37,7 +37,6 @@ using OpenSim.Data;
37using OpenMetaverse; 37using OpenMetaverse;
38using OpenMetaverse.StructuredData; 38using OpenMetaverse.StructuredData;
39using OpenSim.Framework; 39using OpenSim.Framework;
40using OpenSim.Services.UserAccountService;
41 40
42namespace OpenSim.Services.ProfilesService 41namespace OpenSim.Services.ProfilesService
43{ 42{
@@ -48,7 +47,6 @@ namespace OpenSim.Services.ProfilesService
48 MethodBase.GetCurrentMethod().DeclaringType); 47 MethodBase.GetCurrentMethod().DeclaringType);
49 48
50 IUserAccountService userAccounts; 49 IUserAccountService userAccounts;
51 IAuthenticationService authService;
52 50
53 public UserProfilesService(IConfigSource config, string configName): 51 public UserProfilesService(IConfigSource config, string configName):
54 base(config, configName) 52 base(config, configName)
@@ -56,7 +54,7 @@ namespace OpenSim.Services.ProfilesService
56 IConfig Config = config.Configs[configName]; 54 IConfig Config = config.Configs[configName];
57 if (Config == null) 55 if (Config == null)
58 { 56 {
59 m_log.Warn("[PROFILES]: No configuration found!"); 57 m_log.Warn("[PROFILES SERVICE]: No configuration found!");
60 return; 58 return;
61 } 59 }
62 Object[] args = null; 60 Object[] args = null;
@@ -67,9 +65,6 @@ namespace OpenSim.Services.ProfilesService
67 userAccounts = ServerUtils.LoadPlugin<IUserAccountService>(accountService, args); 65 userAccounts = ServerUtils.LoadPlugin<IUserAccountService>(accountService, args);
68 66
69 args = new Object[] { config }; 67 args = new Object[] { config };
70 string authServiceConfig = Config.GetString("AuthenticationServiceModule", String.Empty);
71 if (accountService != string.Empty)
72 authService = ServerUtils.LoadPlugin<IAuthenticationService>(authServiceConfig, args);
73 } 68 }
74 69
75 #region Classifieds 70 #region Classifieds
@@ -178,23 +173,22 @@ namespace OpenSim.Services.ProfilesService
178 account = userAccounts.GetUserAccount(UUID.Zero, pref.UserId); 173 account = userAccounts.GetUserAccount(UUID.Zero, pref.UserId);
179 if(string.IsNullOrEmpty(account.Email)) 174 if(string.IsNullOrEmpty(account.Email))
180 { 175 {
181 result = "No Email address on record!"; 176 pref.EMail = string.Empty;
182 return false;
183 } 177 }
184 else 178 else
185 pref.EMail = account.Email; 179 pref.EMail = account.Email;
186 } 180 }
187 catch 181 catch
188 { 182 {
189 m_log.Info ("[PROFILES]: UserAccountService Exception: Could not get user account"); 183 m_log.Error ("[PROFILES SERVICE]: UserAccountService Exception: Could not get user account");
190 result = "Missing Email address!"; 184 result = "UserAccountService settings error in UserProfileService!";
191 return false; 185 return false;
192 } 186 }
193 } 187 }
194 else 188 else
195 { 189 {
196 m_log.Info ("[PROFILES]: UserAccountService: Could not get user account"); 190 m_log.Error ("[PROFILES SERVICE]: UserAccountService: Could not get user account");
197 result = "Missing Email address!"; 191 result = "UserAccountService settings error in UserProfileService!";
198 return false; 192 return false;
199 } 193 }
200 } 194 }
@@ -203,6 +197,9 @@ namespace OpenSim.Services.ProfilesService
203 197
204 public bool UserPreferencesRequest(ref UserPreferences pref, ref string result) 198 public bool UserPreferencesRequest(ref UserPreferences pref, ref string result)
205 { 199 {
200 if (!ProfilesData.GetUserPreferences(ref pref, ref result))
201 return false;
202
206 if(string.IsNullOrEmpty(pref.EMail)) 203 if(string.IsNullOrEmpty(pref.EMail))
207 { 204 {
208 UserAccount account = new UserAccount(); 205 UserAccount account = new UserAccount();
@@ -213,27 +210,33 @@ namespace OpenSim.Services.ProfilesService
213 account = userAccounts.GetUserAccount(UUID.Zero, pref.UserId); 210 account = userAccounts.GetUserAccount(UUID.Zero, pref.UserId);
214 if(string.IsNullOrEmpty(account.Email)) 211 if(string.IsNullOrEmpty(account.Email))
215 { 212 {
216 result = "No Email address on record!"; 213 pref.EMail = string.Empty;
217 return false;
218 } 214 }
219 else 215 else
216 {
220 pref.EMail = account.Email; 217 pref.EMail = account.Email;
218 UserPreferencesUpdate(ref pref, ref result);
219 }
221 } 220 }
222 catch 221 catch
223 { 222 {
224 m_log.Info ("[PROFILES]: UserAccountService Exception: Could not get user account"); 223 m_log.Error ("[PROFILES SERVICE]: UserAccountService Exception: Could not get user account");
225 result = "Missing Email address!"; 224 result = "UserAccountService settings error in UserProfileService!";
226 return false; 225 return false;
227 } 226 }
228 } 227 }
229 else 228 else
230 { 229 {
231 m_log.Info ("[PROFILES]: UserAccountService: Could not get user account"); 230 m_log.Error ("[PROFILES SERVICE]: UserAccountService: Could not get user account");
232 result = "Missing Email address!"; 231 result = "UserAccountService settings error in UserProfileService!";
233 return false; 232 return false;
234 } 233 }
235 } 234 }
236 return ProfilesData.GetUserPreferences(ref pref, ref result); 235
236 if(string.IsNullOrEmpty(pref.EMail))
237 pref.EMail = "No Email Address On Record";
238
239 return true;
237 } 240 }
238 #endregion User Preferences 241 #endregion User Preferences
239 */ 242 */
diff --git a/OpenSim/Services/UserProfilesService/UserProfilesServiceBase.cs b/OpenSim/Services/UserProfilesService/UserProfilesServiceBase.cs
index 927f7c9..c31578f 100644
--- a/OpenSim/Services/UserProfilesService/UserProfilesServiceBase.cs
+++ b/OpenSim/Services/UserProfilesService/UserProfilesServiceBase.cs
@@ -52,7 +52,7 @@ namespace OpenSim.Services.ProfilesService
52 { 52 {
53 if(string.IsNullOrEmpty(configName)) 53 if(string.IsNullOrEmpty(configName))
54 { 54 {
55 m_log.WarnFormat("[PROFILES]: Configuration section not given!"); 55 m_log.WarnFormat("[PROFILES SERVICE]: Configuration section not given!");
56 return; 56 return;
57 } 57 }
58 58
@@ -72,6 +72,7 @@ namespace OpenSim.Services.ProfilesService
72 IConfig ProfilesConfig = config.Configs[configName]; 72 IConfig ProfilesConfig = config.Configs[configName];
73 if (ProfilesConfig != null) 73 if (ProfilesConfig != null)
74 { 74 {
75 dllName = ProfilesConfig.GetString("StorageProvider", dllName);
75 connString = ProfilesConfig.GetString("ConnectionString", connString); 76 connString = ProfilesConfig.GetString("ConnectionString", connString);
76 realm = ProfilesConfig.GetString("Realm", realm); 77 realm = ProfilesConfig.GetString("Realm", realm);
77 } 78 }