aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Data/MySQL/MySQLUserProfilesData.cs
diff options
context:
space:
mode:
authorBlueWall2014-11-23 14:25:48 -0500
committerBlueWall2014-11-23 14:25:48 -0500
commit12108bf6e9dc16b6b4b1fe344c1b12ed31a1e4b4 (patch)
treee2d852f5675e7f6714f11dca84fc658bffa8ad8f /OpenSim/Data/MySQL/MySQLUserProfilesData.cs
parentMerge branch 'master' of ssh://opensimulator.org/var/git/opensim (diff)
downloadopensim-SC-12108bf6e9dc16b6b4b1fe344c1b12ed31a1e4b4.zip
opensim-SC-12108bf6e9dc16b6b4b1fe344c1b12ed31a1e4b4.tar.gz
opensim-SC-12108bf6e9dc16b6b4b1fe344c1b12ed31a1e4b4.tar.bz2
opensim-SC-12108bf6e9dc16b6b4b1fe344c1b12ed31a1e4b4.tar.xz
Fix handling of user preference updates where no email address is supplied
Diffstat (limited to '')
-rw-r--r--OpenSim/Data/MySQL/MySQLUserProfilesData.cs13
1 files changed, 9 insertions, 4 deletions
diff --git a/OpenSim/Data/MySQL/MySQLUserProfilesData.cs b/OpenSim/Data/MySQL/MySQLUserProfilesData.cs
index cab0ca8..da05ff0 100644
--- a/OpenSim/Data/MySQL/MySQLUserProfilesData.cs
+++ b/OpenSim/Data/MySQL/MySQLUserProfilesData.cs
@@ -915,7 +915,10 @@ namespace OpenSim.Data.MySQL
915 reader.Read(); 915 reader.Read();
916 bool.TryParse((string)reader["imviaemail"], out pref.IMViaEmail); 916 bool.TryParse((string)reader["imviaemail"], out pref.IMViaEmail);
917 bool.TryParse((string)reader["visible"], out pref.Visible); 917 bool.TryParse((string)reader["visible"], out pref.Visible);
918 pref.EMail = (string)reader["email"]; 918 pref.EMail = (string)reader["email"];
919
920 if(string.IsNullOrEmpty(pref.EMail))
921 pref.EMail = "No EMail Address Provided";
919 } 922 }
920 else 923 else
921 { 924 {
@@ -954,7 +957,8 @@ namespace OpenSim.Data.MySQL
954 957
955 query += "UPDATE usersettings SET "; 958 query += "UPDATE usersettings SET ";
956 query += "imviaemail=?ImViaEmail, "; 959 query += "imviaemail=?ImViaEmail, ";
957 query += "visible=?Visible "; 960 query += "visible=?Visible, ";
961 query += "email=?EMail ";
958 query += "WHERE useruuid=?uuid"; 962 query += "WHERE useruuid=?uuid";
959 963
960 try 964 try
@@ -966,7 +970,8 @@ namespace OpenSim.Data.MySQL
966 { 970 {
967 cmd.Parameters.AddWithValue("?ImViaEmail", pref.IMViaEmail.ToString().ToLower()); 971 cmd.Parameters.AddWithValue("?ImViaEmail", pref.IMViaEmail.ToString().ToLower());
968 cmd.Parameters.AddWithValue("?Visible", pref.Visible.ToString().ToLower()); 972 cmd.Parameters.AddWithValue("?Visible", pref.Visible.ToString().ToLower());
969 cmd.Parameters.AddWithValue("?uuid", pref.UserId.ToString()); 973 cmd.Parameters.AddWithValue("?uuid", pref.UserId.ToString());
974 cmd.Parameters.AddWithValue("?EMail", pref.EMail.ToString().ToLower());
970 975
971 cmd.ExecuteNonQuery(); 976 cmd.ExecuteNonQuery();
972 } 977 }
@@ -975,7 +980,7 @@ namespace OpenSim.Data.MySQL
975 catch (Exception e) 980 catch (Exception e)
976 { 981 {
977 m_log.ErrorFormat("[PROFILES_DATA]" + 982 m_log.ErrorFormat("[PROFILES_DATA]" +
978 ": AgentInterestsUpdate exception {0}", e.Message); 983 ": UserPreferencesUpdate exception {0} {1}", e.Message, e.InnerException);
979 result = e.Message; 984 result = e.Message;
980 return false; 985 return false;
981 } 986 }