aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Data
diff options
context:
space:
mode:
authorBlueWall2013-12-16 15:10:09 -0500
committerBlueWall2013-12-16 17:36:04 -0500
commitb03ec6137f462486a3469f6ba4bbd363dc85295f (patch)
tree7758ff41f80956b007acb281432e855cdbdd9668 /OpenSim/Data
parentMerge branch 'master' of melanie@opensimulator.org:/var/git/opensim (diff)
downloadopensim-SC_OLD-b03ec6137f462486a3469f6ba4bbd363dc85295f.zip
opensim-SC_OLD-b03ec6137f462486a3469f6ba4bbd363dc85295f.tar.gz
opensim-SC_OLD-b03ec6137f462486a3469f6ba4bbd363dc85295f.tar.bz2
opensim-SC_OLD-b03ec6137f462486a3469f6ba4bbd363dc85295f.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.cs16
-rw-r--r--OpenSim/Data/SQLite/SQLiteUserProfilesData.cs3
2 files changed, 12 insertions, 7 deletions
diff --git a/OpenSim/Data/MySQL/MySQLUserProfilesData.cs b/OpenSim/Data/MySQL/MySQLUserProfilesData.cs
index 63492c2..0bf9595 100644
--- a/OpenSim/Data/MySQL/MySQLUserProfilesData.cs
+++ b/OpenSim/Data/MySQL/MySQLUserProfilesData.cs
@@ -925,15 +925,19 @@ namespace OpenSim.Data.MySQL
925 } 925 }
926 else 926 else
927 { 927 {
928 dbcon.Close();
929 dbcon.Open();
930
931 query = "INSERT INTO usersettings VALUES ";
932 query += "(?uuid,'false','false', ?Email)";
933
928 using (MySqlCommand put = new MySqlCommand(query, dbcon)) 934 using (MySqlCommand put = new MySqlCommand(query, dbcon))
929 { 935 {
930 query = "INSERT INTO usersettings VALUES ";
931 query += "(?Id,'false','false', '')";
932 936
933 lock(Lock) 937 put.Parameters.AddWithValue("?Email", pref.EMail);
934 { 938 put.Parameters.AddWithValue("?uuid", pref.UserId.ToString());
935 put.ExecuteNonQuery(); 939
936 } 940 put.ExecuteNonQuery();
937 } 941 }
938 } 942 }
939 } 943 }
diff --git a/OpenSim/Data/SQLite/SQLiteUserProfilesData.cs b/OpenSim/Data/SQLite/SQLiteUserProfilesData.cs
index 916a226..90d45e9 100644
--- a/OpenSim/Data/SQLite/SQLiteUserProfilesData.cs
+++ b/OpenSim/Data/SQLite/SQLiteUserProfilesData.cs
@@ -808,11 +808,12 @@ namespace OpenSim.Data.SQLite
808 else 808 else
809 { 809 {
810 query = "INSERT INTO usersettings VALUES "; 810 query = "INSERT INTO usersettings VALUES ";
811 query += "(:Id,'false','false', '')"; 811 query += "(:Id,'false','false', :Email)";
812 812
813 using (SqliteCommand put = (SqliteCommand)m_connection.CreateCommand()) 813 using (SqliteCommand put = (SqliteCommand)m_connection.CreateCommand())
814 { 814 {
815 put.Parameters.AddWithValue(":Id", pref.UserId.ToString()); 815 put.Parameters.AddWithValue(":Id", pref.UserId.ToString());
816 put.Parameters.AddWithValue(":Email", pref.EMail);
816 put.ExecuteNonQuery(); 817 put.ExecuteNonQuery();
817 818
818 } 819 }