diff options
author | BlueWall | 2013-12-16 15:10:09 -0500 |
---|---|---|
committer | BlueWall | 2013-12-16 16:25:14 -0500 |
commit | b699af87dc5abca607f449caaee1a1ecc4131bf3 (patch) | |
tree | 797174ee5f00417afbebb7f039a2d1b3e444d80d /OpenSim/Data | |
parent | Backport profile fixes (diff) | |
download | opensim-SC_OLD-b699af87dc5abca607f449caaee1a1ecc4131bf3.zip opensim-SC_OLD-b699af87dc5abca607f449caaee1a1ecc4131bf3.tar.gz opensim-SC_OLD-b699af87dc5abca607f449caaee1a1ecc4131bf3.tar.bz2 opensim-SC_OLD-b699af87dc5abca607f449caaee1a1ecc4131bf3.tar.xz |
Populate user preferences with UserAccount email if it is present, else return an error indicating no email is on record for the user.
Diffstat (limited to 'OpenSim/Data')
-rw-r--r-- | OpenSim/Data/MySQL/MySQLUserProfilesData.cs | 16 | ||||
-rw-r--r-- | OpenSim/Data/SQLite/SQLiteUserProfilesData.cs | 3 |
2 files changed, 12 insertions, 7 deletions
diff --git a/OpenSim/Data/MySQL/MySQLUserProfilesData.cs b/OpenSim/Data/MySQL/MySQLUserProfilesData.cs index dca80c3..48044f0 100644 --- a/OpenSim/Data/MySQL/MySQLUserProfilesData.cs +++ b/OpenSim/Data/MySQL/MySQLUserProfilesData.cs | |||
@@ -927,15 +927,19 @@ namespace OpenSim.Data.MySQL | |||
927 | } | 927 | } |
928 | else | 928 | else |
929 | { | 929 | { |
930 | dbcon.Close(); | ||
931 | dbcon.Open(); | ||
932 | |||
933 | query = "INSERT INTO usersettings VALUES "; | ||
934 | query += "(?uuid,'false','false', ?Email)"; | ||
935 | |||
930 | using (MySqlCommand put = new MySqlCommand(query, dbcon)) | 936 | using (MySqlCommand put = new MySqlCommand(query, dbcon)) |
931 | { | 937 | { |
932 | query = "INSERT INTO usersettings VALUES "; | ||
933 | query += "(?Id,'false','false', '')"; | ||
934 | 938 | ||
935 | lock(Lock) | 939 | put.Parameters.AddWithValue("?Email", pref.EMail); |
936 | { | 940 | put.Parameters.AddWithValue("?uuid", pref.UserId.ToString()); |
937 | put.ExecuteNonQuery(); | 941 | |
938 | } | 942 | put.ExecuteNonQuery(); |
939 | } | 943 | } |
940 | } | 944 | } |
941 | } | 945 | } |
diff --git a/OpenSim/Data/SQLite/SQLiteUserProfilesData.cs b/OpenSim/Data/SQLite/SQLiteUserProfilesData.cs index 70ce07c..0a6c625 100644 --- a/OpenSim/Data/SQLite/SQLiteUserProfilesData.cs +++ b/OpenSim/Data/SQLite/SQLiteUserProfilesData.cs | |||
@@ -810,11 +810,12 @@ namespace OpenSim.Data.SQLite | |||
810 | else | 810 | else |
811 | { | 811 | { |
812 | query = "INSERT INTO usersettings VALUES "; | 812 | query = "INSERT INTO usersettings VALUES "; |
813 | query += "(:Id,'false','false', '')"; | 813 | query += "(:Id,'false','false', :Email)"; |
814 | 814 | ||
815 | using (SqliteCommand put = (SqliteCommand)m_connection.CreateCommand()) | 815 | using (SqliteCommand put = (SqliteCommand)m_connection.CreateCommand()) |
816 | { | 816 | { |
817 | put.Parameters.AddWithValue(":Id", pref.UserId.ToString()); | 817 | put.Parameters.AddWithValue(":Id", pref.UserId.ToString()); |
818 | put.Parameters.AddWithValue(":Email", pref.EMail); | ||
818 | put.ExecuteNonQuery(); | 819 | put.ExecuteNonQuery(); |
819 | 820 | ||
820 | } | 821 | } |