diff options
author | Sean Dague | 2008-11-04 19:26:17 +0000 |
---|---|---|
committer | Sean Dague | 2008-11-04 19:26:17 +0000 |
commit | 7d6dc3b0999d5d4dbe0ec560db43a1de047408b7 (patch) | |
tree | f43f7310cfbbd35788bc473401915710208353b0 /OpenSim/Data | |
parent | - Added stronger persistence tests for BasicUserTests (diff) | |
download | opensim-SC-7d6dc3b0999d5d4dbe0ec560db43a1de047408b7.zip opensim-SC-7d6dc3b0999d5d4dbe0ec560db43a1de047408b7.tar.gz opensim-SC-7d6dc3b0999d5d4dbe0ec560db43a1de047408b7.tar.bz2 opensim-SC-7d6dc3b0999d5d4dbe0ec560db43a1de047408b7.tar.xz |
add some null protection on email
From: Sean Dague <sdague@gmail.com>
Diffstat (limited to 'OpenSim/Data')
-rw-r--r-- | OpenSim/Data/MySQL/MySQLManager.cs | 2 | ||||
-rw-r--r-- | OpenSim/Data/SQLite/SQLiteUserData.cs | 3 |
2 files changed, 3 insertions, 2 deletions
diff --git a/OpenSim/Data/MySQL/MySQLManager.cs b/OpenSim/Data/MySQL/MySQLManager.cs index 7096efa..c584eb9 100644 --- a/OpenSim/Data/MySQL/MySQLManager.cs +++ b/OpenSim/Data/MySQL/MySQLManager.cs | |||
@@ -540,7 +540,7 @@ namespace OpenSim.Data.MySQL | |||
540 | retval.ID = id; | 540 | retval.ID = id; |
541 | retval.FirstName = (string) reader["username"]; | 541 | retval.FirstName = (string) reader["username"]; |
542 | retval.SurName = (string) reader["lastname"]; | 542 | retval.SurName = (string) reader["lastname"]; |
543 | retval.Email = (string) reader["email"]; | 543 | retval.Email = (reader.IsDBNull(reader.GetOrdinal("email"))) ? "" : (string) reader["email"]; |
544 | 544 | ||
545 | retval.PasswordHash = (string) reader["passwordHash"]; | 545 | retval.PasswordHash = (string) reader["passwordHash"]; |
546 | retval.PasswordSalt = (string) reader["passwordSalt"]; | 546 | retval.PasswordSalt = (string) reader["passwordSalt"]; |
diff --git a/OpenSim/Data/SQLite/SQLiteUserData.cs b/OpenSim/Data/SQLite/SQLiteUserData.cs index 50a1d73..369fc51 100644 --- a/OpenSim/Data/SQLite/SQLiteUserData.cs +++ b/OpenSim/Data/SQLite/SQLiteUserData.cs | |||
@@ -813,7 +813,8 @@ namespace OpenSim.Data.SQLite | |||
813 | user.ID = tmp; | 813 | user.ID = tmp; |
814 | user.FirstName = (String) row["username"]; | 814 | user.FirstName = (String) row["username"]; |
815 | user.SurName = (String) row["surname"]; | 815 | user.SurName = (String) row["surname"]; |
816 | user.Email = (String) row["email"]; | 816 | user.Email = (row.IsNull("email")) ? "" : (String) row["email"]; |
817 | |||
817 | user.PasswordHash = (String) row["passwordHash"]; | 818 | user.PasswordHash = (String) row["passwordHash"]; |
818 | user.PasswordSalt = (String) row["passwordSalt"]; | 819 | user.PasswordSalt = (String) row["passwordSalt"]; |
819 | 820 | ||