aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Data
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--OpenSim/Data/MySQL/MySQLManager.cs10
-rw-r--r--OpenSim/Data/MySQL/MySQLUserData.cs2
-rw-r--r--OpenSim/Data/SQLite/SQLiteUserData.cs7
3 files changed, 16 insertions, 3 deletions
diff --git a/OpenSim/Data/MySQL/MySQLManager.cs b/OpenSim/Data/MySQL/MySQLManager.cs
index 89d0672..297b1a7 100644
--- a/OpenSim/Data/MySQL/MySQLManager.cs
+++ b/OpenSim/Data/MySQL/MySQLManager.cs
@@ -538,6 +538,10 @@ namespace OpenSim.Data.MySQL
538 Convert.ToSingle(reader["homeLookAtY"].ToString()), 538 Convert.ToSingle(reader["homeLookAtY"].ToString()),
539 Convert.ToSingle(reader["homeLookAtZ"].ToString())); 539 Convert.ToSingle(reader["homeLookAtZ"].ToString()));
540 540
541 LLUUID regionID = LLUUID.Zero;
542 LLUUID.TryParse(reader["homeRegionID"].ToString(), out regionID); // it's ok if it doesn't work; just use LLUUID.Zero
543 retval.HomeRegionID = regionID;
544
541 retval.Created = Convert.ToInt32(reader["created"].ToString()); 545 retval.Created = Convert.ToInt32(reader["created"].ToString());
542 retval.LastLogin = Convert.ToInt32(reader["lastLogin"].ToString()); 546 retval.LastLogin = Convert.ToInt32(reader["lastLogin"].ToString());
543 547
@@ -583,6 +587,7 @@ namespace OpenSim.Data.MySQL
583 LLUUID.TryParse((string)reader["webLoginKey"], out tmp); 587 LLUUID.TryParse((string)reader["webLoginKey"], out tmp);
584 retval.WebLoginKey = tmp; 588 retval.WebLoginKey = tmp;
585 } 589 }
590
586 } 591 }
587 else 592 else
588 { 593 {
@@ -806,7 +811,7 @@ namespace OpenSim.Data.MySQL
806 /// <param name="webLoginKey">UUID for weblogin Key</param> 811 /// <param name="webLoginKey">UUID for weblogin Key</param>
807 /// <returns>Success?</returns> 812 /// <returns>Success?</returns>
808 public bool updateUserRow(LLUUID uuid, string username, string lastname, string passwordHash, 813 public bool updateUserRow(LLUUID uuid, string username, string lastname, string passwordHash,
809 string passwordSalt, UInt64 homeRegion, float homeLocX, float homeLocY, float homeLocZ, 814 string passwordSalt, UInt64 homeRegion, LLUUID homeRegionID, float homeLocX, float homeLocY, float homeLocZ,
810 float homeLookAtX, float homeLookAtY, float homeLookAtZ, int created, int lastlogin, 815 float homeLookAtX, float homeLookAtY, float homeLookAtZ, int created, int lastlogin,
811 string inventoryURI, string assetURI, uint canDoMask, uint wantDoMask, 816 string inventoryURI, string assetURI, uint canDoMask, uint wantDoMask,
812 string aboutText, string firstText, 817 string aboutText, string firstText,
@@ -814,7 +819,7 @@ namespace OpenSim.Data.MySQL
814 { 819 {
815 string sql = "UPDATE users SET `username` = ?username , `lastname` = ?lastname "; 820 string sql = "UPDATE users SET `username` = ?username , `lastname` = ?lastname ";
816 sql += ", `passwordHash` = ?passwordHash , `passwordSalt` = ?passwordSalt , "; 821 sql += ", `passwordHash` = ?passwordHash , `passwordSalt` = ?passwordSalt , ";
817 sql += "`homeRegion` = ?homeRegion , `homeLocationX` = ?homeLocationX , "; 822 sql += "`homeRegion` = ?homeRegion , `homeRegionID` = ?homeRegionID, `homeLocationX` = ?homeLocationX , ";
818 sql += "`homeLocationY` = ?homeLocationY , `homeLocationZ` = ?homeLocationZ , "; 823 sql += "`homeLocationY` = ?homeLocationY , `homeLocationZ` = ?homeLocationZ , ";
819 sql += "`homeLookAtX` = ?homeLookAtX , `homeLookAtY` = ?homeLookAtY , "; 824 sql += "`homeLookAtX` = ?homeLookAtX , `homeLookAtY` = ?homeLookAtY , ";
820 sql += "`homeLookAtZ` = ?homeLookAtZ , `created` = ?created , `lastLogin` = ?lastLogin , "; 825 sql += "`homeLookAtZ` = ?homeLookAtZ , `created` = ?created , `lastLogin` = ?lastLogin , ";
@@ -831,6 +836,7 @@ namespace OpenSim.Data.MySQL
831 parameters["?passwordHash"] = passwordHash.ToString(); 836 parameters["?passwordHash"] = passwordHash.ToString();
832 parameters["?passwordSalt"] = passwordSalt.ToString(); 837 parameters["?passwordSalt"] = passwordSalt.ToString();
833 parameters["?homeRegion"] = homeRegion.ToString(); 838 parameters["?homeRegion"] = homeRegion.ToString();
839 parameters["?homeRegionID"] = homeRegionID.ToString();
834 parameters["?homeLocationX"] = homeLocX.ToString(); 840 parameters["?homeLocationX"] = homeLocX.ToString();
835 parameters["?homeLocationY"] = homeLocY.ToString(); 841 parameters["?homeLocationY"] = homeLocY.ToString();
836 parameters["?homeLocationZ"] = homeLocZ.ToString(); 842 parameters["?homeLocationZ"] = homeLocZ.ToString();
diff --git a/OpenSim/Data/MySQL/MySQLUserData.cs b/OpenSim/Data/MySQL/MySQLUserData.cs
index 131823a..d7bf2a8 100644
--- a/OpenSim/Data/MySQL/MySQLUserData.cs
+++ b/OpenSim/Data/MySQL/MySQLUserData.cs
@@ -682,7 +682,7 @@ namespace OpenSim.Data.MySQL
682 lock (database) 682 lock (database)
683 { 683 {
684 database.updateUserRow(user.ID, user.FirstName, user.SurName, user.PasswordHash, user.PasswordSalt, 684 database.updateUserRow(user.ID, user.FirstName, user.SurName, user.PasswordHash, user.PasswordSalt,
685 user.HomeRegion, user.HomeLocation.X, user.HomeLocation.Y, user.HomeLocation.Z, user.HomeLookAt.X, 685 user.HomeRegion, user.HomeRegionID, user.HomeLocation.X, user.HomeLocation.Y, user.HomeLocation.Z, user.HomeLookAt.X,
686 user.HomeLookAt.Y, user.HomeLookAt.Z, user.Created, user.LastLogin, user.UserInventoryURI, 686 user.HomeLookAt.Y, user.HomeLookAt.Z, user.Created, user.LastLogin, user.UserInventoryURI,
687 user.UserAssetURI, user.CanDoMask, user.WantDoMask, user.AboutText, 687 user.UserAssetURI, user.CanDoMask, user.WantDoMask, user.AboutText,
688 user.FirstLifeAboutText, user.Image, user.FirstLifeImage, user.WebLoginKey); 688 user.FirstLifeAboutText, user.Image, user.FirstLifeImage, user.WebLoginKey);
diff --git a/OpenSim/Data/SQLite/SQLiteUserData.cs b/OpenSim/Data/SQLite/SQLiteUserData.cs
index 45b4dc6..21c9dbc 100644
--- a/OpenSim/Data/SQLite/SQLiteUserData.cs
+++ b/OpenSim/Data/SQLite/SQLiteUserData.cs
@@ -662,6 +662,7 @@ namespace OpenSim.Data.SQLite
662 662
663 SQLiteUtil.createCol(users, "homeRegionX", typeof (Int32)); 663 SQLiteUtil.createCol(users, "homeRegionX", typeof (Int32));
664 SQLiteUtil.createCol(users, "homeRegionY", typeof (Int32)); 664 SQLiteUtil.createCol(users, "homeRegionY", typeof (Int32));
665 SQLiteUtil.createCol(users, "homeRegionID", typeof (String));
665 SQLiteUtil.createCol(users, "homeLocationX", typeof (Double)); 666 SQLiteUtil.createCol(users, "homeLocationX", typeof (Double));
666 SQLiteUtil.createCol(users, "homeLocationY", typeof (Double)); 667 SQLiteUtil.createCol(users, "homeLocationY", typeof (Double));
667 SQLiteUtil.createCol(users, "homeLocationZ", typeof (Double)); 668 SQLiteUtil.createCol(users, "homeLocationZ", typeof (Double));
@@ -769,6 +770,11 @@ namespace OpenSim.Data.SQLite
769 Convert.ToSingle(row["homeLookAtY"]), 770 Convert.ToSingle(row["homeLookAtY"]),
770 Convert.ToSingle(row["homeLookAtZ"]) 771 Convert.ToSingle(row["homeLookAtZ"])
771 ); 772 );
773
774 LLUUID regionID = LLUUID.Zero;
775 LLUUID.TryParse(row["homeRegionID"].ToString(), out regionID); // it's ok if it doesn't work; just use LLUUID.Zero
776 user.HomeRegionID = regionID;
777
772 user.Created = Convert.ToInt32(row["created"]); 778 user.Created = Convert.ToInt32(row["created"]);
773 user.LastLogin = Convert.ToInt32(row["lastLogin"]); 779 user.LastLogin = Convert.ToInt32(row["lastLogin"]);
774 user.RootInventoryFolderID = new LLUUID((String) row["rootInventoryFolderID"]); 780 user.RootInventoryFolderID = new LLUUID((String) row["rootInventoryFolderID"]);
@@ -803,6 +809,7 @@ namespace OpenSim.Data.SQLite
803 809
804 row["homeRegionX"] = user.HomeRegionX; 810 row["homeRegionX"] = user.HomeRegionX;
805 row["homeRegionY"] = user.HomeRegionY; 811 row["homeRegionY"] = user.HomeRegionY;
812 row["homeRegionID"] = user.HomeRegionID;
806 row["homeLocationX"] = user.HomeLocation.X; 813 row["homeLocationX"] = user.HomeLocation.X;
807 row["homeLocationY"] = user.HomeLocation.Y; 814 row["homeLocationY"] = user.HomeLocation.Y;
808 row["homeLocationZ"] = user.HomeLocation.Z; 815 row["homeLocationZ"] = user.HomeLocation.Z;