From b03ec6137f462486a3469f6ba4bbd363dc85295f Mon Sep 17 00:00:00 2001 From: BlueWall Date: Mon, 16 Dec 2013 15:10:09 -0500 Subject: Populate user preferences with UserAccount email if it is present, else return an error indicating no email is on record for the user. --- OpenSim/Data/MySQL/MySQLUserProfilesData.cs | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) (limited to 'OpenSim/Data/MySQL') 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 } else { + dbcon.Close(); + dbcon.Open(); + + query = "INSERT INTO usersettings VALUES "; + query += "(?uuid,'false','false', ?Email)"; + using (MySqlCommand put = new MySqlCommand(query, dbcon)) { - query = "INSERT INTO usersettings VALUES "; - query += "(?Id,'false','false', '')"; - lock(Lock) - { - put.ExecuteNonQuery(); - } + put.Parameters.AddWithValue("?Email", pref.EMail); + put.Parameters.AddWithValue("?uuid", pref.UserId.ToString()); + + put.ExecuteNonQuery(); } } } -- cgit v1.1 From 141d771a931140402cfa0575cf31e7116540f7d0 Mon Sep 17 00:00:00 2001 From: BlueWall Date: Mon, 16 Dec 2013 15:43:34 -0500 Subject: Fix issue with editing notes for other avatars --- OpenSim/Data/MySQL/MySQLUserProfilesData.cs | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'OpenSim/Data/MySQL') diff --git a/OpenSim/Data/MySQL/MySQLUserProfilesData.cs b/OpenSim/Data/MySQL/MySQLUserProfilesData.cs index 0bf9595..6ed3b06 100644 --- a/OpenSim/Data/MySQL/MySQLUserProfilesData.cs +++ b/OpenSim/Data/MySQL/MySQLUserProfilesData.cs @@ -546,6 +546,10 @@ namespace OpenSim.Data.MySQL reader.Read(); notes.Notes = OSD.FromString((string)reader["notes"]); } + else + { + notes.Notes = OSD.FromString(""); + } } } } -- cgit v1.1