diff options
author | BlueWall | 2014-11-23 14:25:48 -0500 |
---|---|---|
committer | BlueWall | 2014-11-23 14:25:48 -0500 |
commit | 12108bf6e9dc16b6b4b1fe344c1b12ed31a1e4b4 (patch) | |
tree | e2d852f5675e7f6714f11dca84fc658bffa8ad8f /OpenSim/Data/SQLite/SQLiteUserProfilesData.cs | |
parent | Merge branch 'master' of ssh://opensimulator.org/var/git/opensim (diff) | |
download | opensim-SC_OLD-12108bf6e9dc16b6b4b1fe344c1b12ed31a1e4b4.zip opensim-SC_OLD-12108bf6e9dc16b6b4b1fe344c1b12ed31a1e4b4.tar.gz opensim-SC_OLD-12108bf6e9dc16b6b4b1fe344c1b12ed31a1e4b4.tar.bz2 opensim-SC_OLD-12108bf6e9dc16b6b4b1fe344c1b12ed31a1e4b4.tar.xz |
Fix handling of user preference updates where no email address is supplied
Diffstat (limited to 'OpenSim/Data/SQLite/SQLiteUserProfilesData.cs')
-rw-r--r-- | OpenSim/Data/SQLite/SQLiteUserProfilesData.cs | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/OpenSim/Data/SQLite/SQLiteUserProfilesData.cs b/OpenSim/Data/SQLite/SQLiteUserProfilesData.cs index 7bf3bd5..fd6a1c5 100644 --- a/OpenSim/Data/SQLite/SQLiteUserProfilesData.cs +++ b/OpenSim/Data/SQLite/SQLiteUserProfilesData.cs | |||
@@ -747,7 +747,8 @@ namespace OpenSim.Data.SQLite | |||
747 | 747 | ||
748 | query += "UPDATE usersettings SET "; | 748 | query += "UPDATE usersettings SET "; |
749 | query += "imviaemail=:ImViaEmail, "; | 749 | query += "imviaemail=:ImViaEmail, "; |
750 | query += "visible=:Visible "; | 750 | query += "visible=:Visible, "; |
751 | query += "email=:EMail "; | ||
751 | query += "WHERE useruuid=:uuid"; | 752 | query += "WHERE useruuid=:uuid"; |
752 | 753 | ||
753 | try | 754 | try |
@@ -757,6 +758,7 @@ namespace OpenSim.Data.SQLite | |||
757 | cmd.CommandText = query; | 758 | cmd.CommandText = query; |
758 | cmd.Parameters.AddWithValue(":ImViaEmail", pref.IMViaEmail); | 759 | cmd.Parameters.AddWithValue(":ImViaEmail", pref.IMViaEmail); |
759 | cmd.Parameters.AddWithValue(":Visible", pref.Visible); | 760 | cmd.Parameters.AddWithValue(":Visible", pref.Visible); |
761 | cmd.Parameters.AddWithValue(":EMail", pref.EMail); | ||
760 | cmd.Parameters.AddWithValue(":uuid", pref.UserId.ToString()); | 762 | cmd.Parameters.AddWithValue(":uuid", pref.UserId.ToString()); |
761 | 763 | ||
762 | cmd.ExecuteNonQuery(); | 764 | cmd.ExecuteNonQuery(); |
@@ -796,7 +798,10 @@ namespace OpenSim.Data.SQLite | |||
796 | { | 798 | { |
797 | bool.TryParse((string)reader["imviaemail"], out pref.IMViaEmail); | 799 | bool.TryParse((string)reader["imviaemail"], out pref.IMViaEmail); |
798 | bool.TryParse((string)reader["visible"], out pref.Visible); | 800 | bool.TryParse((string)reader["visible"], out pref.Visible); |
799 | pref.EMail = (string)reader["email"]; | 801 | pref.EMail = (string)reader["email"]; |
802 | |||
803 | if(string.IsNullOrEmpty(pref.EMail)) | ||
804 | pref.EMail = "No EMail Address Provided"; | ||
800 | } | 805 | } |
801 | else | 806 | else |
802 | { | 807 | { |