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/PGSQL/PGSQLUserProfilesData.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 '')
-rw-r--r-- | OpenSim/Data/PGSQL/PGSQLUserProfilesData.cs | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/OpenSim/Data/PGSQL/PGSQLUserProfilesData.cs b/OpenSim/Data/PGSQL/PGSQLUserProfilesData.cs index 4a08100..e263857 100644 --- a/OpenSim/Data/PGSQL/PGSQLUserProfilesData.cs +++ b/OpenSim/Data/PGSQL/PGSQLUserProfilesData.cs | |||
@@ -901,7 +901,10 @@ namespace OpenSim.Data.PGSQL | |||
901 | reader.Read(); | 901 | reader.Read(); |
902 | bool.TryParse((string)reader["imviaemail"], out pref.IMViaEmail); | 902 | bool.TryParse((string)reader["imviaemail"], out pref.IMViaEmail); |
903 | bool.TryParse((string)reader["visible"], out pref.Visible); | 903 | bool.TryParse((string)reader["visible"], out pref.Visible); |
904 | pref.EMail = (string)reader["email"]; | 904 | pref.EMail = (string)reader["email"]; |
905 | |||
906 | if(string.IsNullOrEmpty(pref.EMail)) | ||
907 | pref.EMail = "No EMail Address Provided"; | ||
905 | } | 908 | } |
906 | else | 909 | else |
907 | { | 910 | { |
@@ -935,7 +938,8 @@ namespace OpenSim.Data.PGSQL | |||
935 | 938 | ||
936 | query += "UPDATE usersettings SET "; | 939 | query += "UPDATE usersettings SET "; |
937 | query += "imviaemail=:ImViaEmail, "; | 940 | query += "imviaemail=:ImViaEmail, "; |
938 | query += "visible=:Visible,"; | 941 | query += "visible=:Visible, "; |
942 | query += "email=:Email "; | ||
939 | query += "WHERE useruuid=:uuid"; | 943 | query += "WHERE useruuid=:uuid"; |
940 | 944 | ||
941 | try | 945 | try |
@@ -946,7 +950,8 @@ namespace OpenSim.Data.PGSQL | |||
946 | using (NpgsqlCommand cmd = new NpgsqlCommand(query, dbcon)) | 950 | using (NpgsqlCommand cmd = new NpgsqlCommand(query, dbcon)) |
947 | { | 951 | { |
948 | cmd.Parameters.Add(m_database.CreateParameter("ImViaEmail", pref.IMViaEmail.ToString().ToLower ())); | 952 | cmd.Parameters.Add(m_database.CreateParameter("ImViaEmail", pref.IMViaEmail.ToString().ToLower ())); |
949 | cmd.Parameters.Add(m_database.CreateParameter("Visible", pref.Visible.ToString().ToLower ())); | 953 | cmd.Parameters.Add(m_database.CreateParameter("Visible", pref.Visible.ToString().ToLower ())); |
954 | cmd.Parameters.Add(m_database.CreateParameter("EMail", pref.EMail.ToString().ToLower ())); | ||
950 | cmd.Parameters.Add(m_database.CreateParameter("uuid", pref.UserId.ToString())); | 955 | cmd.Parameters.Add(m_database.CreateParameter("uuid", pref.UserId.ToString())); |
951 | 956 | ||
952 | lock(Lock) | 957 | lock(Lock) |