From 349f6ec3e59b7963fd1bf578f7e5640ffda1975b Mon Sep 17 00:00:00 2001
From: Justin Clarke Casey
Date: Tue, 4 Nov 2008 21:44:57 +0000
Subject: * Apply http://opensimulator.org/mantis/view.php?id=2555 * Add new
e-mail field to users table for MSSQL * Thanks StrawberryFride
---
OpenSim/Data/MSSQL/MSSQLUserData.cs | 11 +++++++----
1 file changed, 7 insertions(+), 4 deletions(-)
(limited to 'OpenSim/Data/MSSQL')
diff --git a/OpenSim/Data/MSSQL/MSSQLUserData.cs b/OpenSim/Data/MSSQL/MSSQLUserData.cs
index 4d4b3bc..dc7b6e4 100644
--- a/OpenSim/Data/MSSQL/MSSQLUserData.cs
+++ b/OpenSim/Data/MSSQL/MSSQLUserData.cs
@@ -268,7 +268,7 @@ namespace OpenSim.Data.MSSQL
{
try
{
- InsertUserRow(user.ID, user.FirstName, user.SurName, user.PasswordHash, user.PasswordSalt,
+ InsertUserRow(user.ID, user.FirstName, user.SurName, user.Email, user.PasswordHash, user.PasswordSalt,
user.HomeRegion, user.HomeLocation.X, user.HomeLocation.Y,
user.HomeLocation.Z,
user.HomeLookAt.X, user.HomeLookAt.Y, user.HomeLookAt.Z, user.Created,
@@ -294,6 +294,7 @@ namespace OpenSim.Data.MSSQL
using (AutoClosingSqlCommand command = database.Query("UPDATE " + m_usersTableName + " set UUID = @uuid, " +
"username = @username, " +
"lastname = @lastname," +
+ "email = @email," +
"passwordHash = @passwordHash," +
"passwordSalt = @passwordSalt," +
"homeRegion = @homeRegion," +
@@ -324,6 +325,7 @@ namespace OpenSim.Data.MSSQL
command.Parameters.Add(database.CreateParameter("uuid", user.ID));
command.Parameters.Add(database.CreateParameter("username", user.FirstName));
command.Parameters.Add(database.CreateParameter("lastname", user.SurName));
+ command.Parameters.Add(database.CreateParameter("email", user.Email));
command.Parameters.Add(database.CreateParameter("passwordHash", user.PasswordHash));
command.Parameters.Add(database.CreateParameter("passwordSalt", user.PasswordSalt));
command.Parameters.Add(database.CreateParameter("homeRegion", user.HomeRegion));
@@ -1135,7 +1137,7 @@ ELSE
/// unknown
/// UUID of partner
/// Success?
- private void InsertUserRow(UUID uuid, string username, string lastname, string passwordHash,
+ private void InsertUserRow(UUID uuid, string username, string lastname, string email, string passwordHash,
string passwordSalt, UInt64 homeRegion, float homeLocX, float homeLocY, float homeLocZ,
float homeLookAtX, float homeLookAtY, float homeLookAtZ, int created, int lastlogin,
string inventoryURI, string assetURI, uint canDoMask, uint wantDoMask,
@@ -1144,13 +1146,13 @@ ELSE
int godLevel, int userFlags, string customType, UUID partnerID)
{
string sql = "INSERT INTO " + m_usersTableName;
- sql += " ([UUID], [username], [lastname], [passwordHash], [passwordSalt], [homeRegion], ";
+ sql += " ([UUID], [username], [lastname], [email], [passwordHash], [passwordSalt], [homeRegion], ";
sql += "[homeLocationX], [homeLocationY], [homeLocationZ], [homeLookAtX], [homeLookAtY], [homeLookAtZ], [created], ";
sql += "[lastLogin], [userInventoryURI], [userAssetURI], [profileCanDoMask], [profileWantDoMask], [profileAboutText], ";
sql += "[profileFirstText], [profileImage], [profileFirstImage], [webLoginKey], ";
sql += "[homeRegionID], [userFlags], [godLevel], [customType], [partner]) VALUES ";
- sql += "(@UUID, @username, @lastname, @passwordHash, @passwordSalt, @homeRegion, ";
+ sql += "(@UUID, @username, @lastname, @email, @passwordHash, @passwordSalt, @homeRegion, ";
sql += "@homeLocationX, @homeLocationY, @homeLocationZ, @homeLookAtX, @homeLookAtY, @homeLookAtZ, @created, ";
sql += "@lastLogin, @userInventoryURI, @userAssetURI, @profileCanDoMask, @profileWantDoMask, @profileAboutText, ";
sql += "@profileFirstText, @profileImage, @profileFirstImage, @webLoginKey, ";
@@ -1163,6 +1165,7 @@ ELSE
command.Parameters.Add(database.CreateParameter("UUID", uuid));
command.Parameters.Add(database.CreateParameter("username", username));
command.Parameters.Add(database.CreateParameter("lastname", lastname));
+ command.Parameters.Add(database.CreateParameter("email", email));
command.Parameters.Add(database.CreateParameter("passwordHash", passwordHash));
command.Parameters.Add(database.CreateParameter("passwordSalt", passwordSalt));
command.Parameters.Add(database.CreateParameter("homeRegion", homeRegion));
--
cgit v1.1