diff options
Diffstat (limited to 'OpenSim/Data')
-rw-r--r-- | OpenSim/Data/MySQL/MySQLUserProfilesData.cs | 13 | ||||
-rw-r--r-- | OpenSim/Data/PGSQL/PGSQLUserProfilesData.cs | 11 | ||||
-rw-r--r-- | OpenSim/Data/SQLite/SQLiteUserProfilesData.cs | 9 |
3 files changed, 24 insertions, 9 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 | } |
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) |
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 | { |