aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Data/MSSQL/MSSQLUserData.cs
diff options
context:
space:
mode:
authorJustin Clarke Casey2008-11-04 21:44:57 +0000
committerJustin Clarke Casey2008-11-04 21:44:57 +0000
commit349f6ec3e59b7963fd1bf578f7e5640ffda1975b (patch)
treea69054c099e3461f119806ec9593d616687b91a0 /OpenSim/Data/MSSQL/MSSQLUserData.cs
parent* Correct build break from last commit - how on earth did it compile last tim... (diff)
downloadopensim-SC_OLD-349f6ec3e59b7963fd1bf578f7e5640ffda1975b.zip
opensim-SC_OLD-349f6ec3e59b7963fd1bf578f7e5640ffda1975b.tar.gz
opensim-SC_OLD-349f6ec3e59b7963fd1bf578f7e5640ffda1975b.tar.bz2
opensim-SC_OLD-349f6ec3e59b7963fd1bf578f7e5640ffda1975b.tar.xz
* Apply http://opensimulator.org/mantis/view.php?id=2555
* Add new e-mail field to users table for MSSQL * Thanks StrawberryFride
Diffstat (limited to '')
-rw-r--r--OpenSim/Data/MSSQL/MSSQLUserData.cs11
1 files changed, 7 insertions, 4 deletions
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
268 { 268 {
269 try 269 try
270 { 270 {
271 InsertUserRow(user.ID, user.FirstName, user.SurName, user.PasswordHash, user.PasswordSalt, 271 InsertUserRow(user.ID, user.FirstName, user.SurName, user.Email, user.PasswordHash, user.PasswordSalt,
272 user.HomeRegion, user.HomeLocation.X, user.HomeLocation.Y, 272 user.HomeRegion, user.HomeLocation.X, user.HomeLocation.Y,
273 user.HomeLocation.Z, 273 user.HomeLocation.Z,
274 user.HomeLookAt.X, user.HomeLookAt.Y, user.HomeLookAt.Z, user.Created, 274 user.HomeLookAt.X, user.HomeLookAt.Y, user.HomeLookAt.Z, user.Created,
@@ -294,6 +294,7 @@ namespace OpenSim.Data.MSSQL
294 using (AutoClosingSqlCommand command = database.Query("UPDATE " + m_usersTableName + " set UUID = @uuid, " + 294 using (AutoClosingSqlCommand command = database.Query("UPDATE " + m_usersTableName + " set UUID = @uuid, " +
295 "username = @username, " + 295 "username = @username, " +
296 "lastname = @lastname," + 296 "lastname = @lastname," +
297 "email = @email," +
297 "passwordHash = @passwordHash," + 298 "passwordHash = @passwordHash," +
298 "passwordSalt = @passwordSalt," + 299 "passwordSalt = @passwordSalt," +
299 "homeRegion = @homeRegion," + 300 "homeRegion = @homeRegion," +
@@ -324,6 +325,7 @@ namespace OpenSim.Data.MSSQL
324 command.Parameters.Add(database.CreateParameter("uuid", user.ID)); 325 command.Parameters.Add(database.CreateParameter("uuid", user.ID));
325 command.Parameters.Add(database.CreateParameter("username", user.FirstName)); 326 command.Parameters.Add(database.CreateParameter("username", user.FirstName));
326 command.Parameters.Add(database.CreateParameter("lastname", user.SurName)); 327 command.Parameters.Add(database.CreateParameter("lastname", user.SurName));
328 command.Parameters.Add(database.CreateParameter("email", user.Email));
327 command.Parameters.Add(database.CreateParameter("passwordHash", user.PasswordHash)); 329 command.Parameters.Add(database.CreateParameter("passwordHash", user.PasswordHash));
328 command.Parameters.Add(database.CreateParameter("passwordSalt", user.PasswordSalt)); 330 command.Parameters.Add(database.CreateParameter("passwordSalt", user.PasswordSalt));
329 command.Parameters.Add(database.CreateParameter("homeRegion", user.HomeRegion)); 331 command.Parameters.Add(database.CreateParameter("homeRegion", user.HomeRegion));
@@ -1135,7 +1137,7 @@ ELSE
1135 /// <param name="customType">unknown</param> 1137 /// <param name="customType">unknown</param>
1136 /// <param name="partnerID">UUID of partner</param> 1138 /// <param name="partnerID">UUID of partner</param>
1137 /// <returns>Success?</returns> 1139 /// <returns>Success?</returns>
1138 private void InsertUserRow(UUID uuid, string username, string lastname, string passwordHash, 1140 private void InsertUserRow(UUID uuid, string username, string lastname, string email, string passwordHash,
1139 string passwordSalt, UInt64 homeRegion, float homeLocX, float homeLocY, float homeLocZ, 1141 string passwordSalt, UInt64 homeRegion, float homeLocX, float homeLocY, float homeLocZ,
1140 float homeLookAtX, float homeLookAtY, float homeLookAtZ, int created, int lastlogin, 1142 float homeLookAtX, float homeLookAtY, float homeLookAtZ, int created, int lastlogin,
1141 string inventoryURI, string assetURI, uint canDoMask, uint wantDoMask, 1143 string inventoryURI, string assetURI, uint canDoMask, uint wantDoMask,
@@ -1144,13 +1146,13 @@ ELSE
1144 int godLevel, int userFlags, string customType, UUID partnerID) 1146 int godLevel, int userFlags, string customType, UUID partnerID)
1145 { 1147 {
1146 string sql = "INSERT INTO " + m_usersTableName; 1148 string sql = "INSERT INTO " + m_usersTableName;
1147 sql += " ([UUID], [username], [lastname], [passwordHash], [passwordSalt], [homeRegion], "; 1149 sql += " ([UUID], [username], [lastname], [email], [passwordHash], [passwordSalt], [homeRegion], ";
1148 sql += "[homeLocationX], [homeLocationY], [homeLocationZ], [homeLookAtX], [homeLookAtY], [homeLookAtZ], [created], "; 1150 sql += "[homeLocationX], [homeLocationY], [homeLocationZ], [homeLookAtX], [homeLookAtY], [homeLookAtZ], [created], ";
1149 sql += "[lastLogin], [userInventoryURI], [userAssetURI], [profileCanDoMask], [profileWantDoMask], [profileAboutText], "; 1151 sql += "[lastLogin], [userInventoryURI], [userAssetURI], [profileCanDoMask], [profileWantDoMask], [profileAboutText], ";
1150 sql += "[profileFirstText], [profileImage], [profileFirstImage], [webLoginKey], "; 1152 sql += "[profileFirstText], [profileImage], [profileFirstImage], [webLoginKey], ";
1151 sql += "[homeRegionID], [userFlags], [godLevel], [customType], [partner]) VALUES "; 1153 sql += "[homeRegionID], [userFlags], [godLevel], [customType], [partner]) VALUES ";
1152 1154
1153 sql += "(@UUID, @username, @lastname, @passwordHash, @passwordSalt, @homeRegion, "; 1155 sql += "(@UUID, @username, @lastname, @email, @passwordHash, @passwordSalt, @homeRegion, ";
1154 sql += "@homeLocationX, @homeLocationY, @homeLocationZ, @homeLookAtX, @homeLookAtY, @homeLookAtZ, @created, "; 1156 sql += "@homeLocationX, @homeLocationY, @homeLocationZ, @homeLookAtX, @homeLookAtY, @homeLookAtZ, @created, ";
1155 sql += "@lastLogin, @userInventoryURI, @userAssetURI, @profileCanDoMask, @profileWantDoMask, @profileAboutText, "; 1157 sql += "@lastLogin, @userInventoryURI, @userAssetURI, @profileCanDoMask, @profileWantDoMask, @profileAboutText, ";
1156 sql += "@profileFirstText, @profileImage, @profileFirstImage, @webLoginKey, "; 1158 sql += "@profileFirstText, @profileImage, @profileFirstImage, @webLoginKey, ";
@@ -1163,6 +1165,7 @@ ELSE
1163 command.Parameters.Add(database.CreateParameter("UUID", uuid)); 1165 command.Parameters.Add(database.CreateParameter("UUID", uuid));
1164 command.Parameters.Add(database.CreateParameter("username", username)); 1166 command.Parameters.Add(database.CreateParameter("username", username));
1165 command.Parameters.Add(database.CreateParameter("lastname", lastname)); 1167 command.Parameters.Add(database.CreateParameter("lastname", lastname));
1168 command.Parameters.Add(database.CreateParameter("email", email));
1166 command.Parameters.Add(database.CreateParameter("passwordHash", passwordHash)); 1169 command.Parameters.Add(database.CreateParameter("passwordHash", passwordHash));
1167 command.Parameters.Add(database.CreateParameter("passwordSalt", passwordSalt)); 1170 command.Parameters.Add(database.CreateParameter("passwordSalt", passwordSalt));
1168 command.Parameters.Add(database.CreateParameter("homeRegion", homeRegion)); 1171 command.Parameters.Add(database.CreateParameter("homeRegion", homeRegion));