Populate user preferences with UserAccount email if it is present, else return an error indicating no email is on record for the user.

This commit is contained in:
BlueWall
2013-12-16 15:10:09 -05:00
parent fe01e7d1cc
commit b03ec6137f
3 changed files with 73 additions and 7 deletions

View File

@@ -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();
}
}
}