diff options
Diffstat (limited to 'OpenSim/Data/SQLite')
-rw-r--r-- | OpenSim/Data/SQLite/Resources/001_UserAccount.sql | 2 | ||||
-rw-r--r-- | OpenSim/Data/SQLite/SQLiteAuthenticationData.cs | 2 | ||||
-rw-r--r-- | OpenSim/Data/SQLite/SQLiteUserAccountData.cs | 2 |
3 files changed, 3 insertions, 3 deletions
diff --git a/OpenSim/Data/SQLite/Resources/001_UserAccount.sql b/OpenSim/Data/SQLite/Resources/001_UserAccount.sql index f9bf24c..c38d9a7 100644 --- a/OpenSim/Data/SQLite/Resources/001_UserAccount.sql +++ b/OpenSim/Data/SQLite/Resources/001_UserAccount.sql | |||
@@ -2,7 +2,7 @@ | |||
2 | 2 | ||
3 | -- useraccounts table | 3 | -- useraccounts table |
4 | CREATE TABLE UserAccounts ( | 4 | CREATE TABLE UserAccounts ( |
5 | PrincipalID CHAR(36) NOT NULL, | 5 | PrincipalID CHAR(36) primary key, |
6 | ScopeID CHAR(36) NOT NULL, | 6 | ScopeID CHAR(36) NOT NULL, |
7 | FirstName VARCHAR(64) NOT NULL, | 7 | FirstName VARCHAR(64) NOT NULL, |
8 | LastName VARCHAR(64) NOT NULL, | 8 | LastName VARCHAR(64) NOT NULL, |
diff --git a/OpenSim/Data/SQLite/SQLiteAuthenticationData.cs b/OpenSim/Data/SQLite/SQLiteAuthenticationData.cs index 2c28375..aa10734 100644 --- a/OpenSim/Data/SQLite/SQLiteAuthenticationData.cs +++ b/OpenSim/Data/SQLite/SQLiteAuthenticationData.cs | |||
@@ -235,7 +235,7 @@ namespace OpenSim.Data.SQLite | |||
235 | if (System.Environment.TickCount - m_LastExpire > 30000) | 235 | if (System.Environment.TickCount - m_LastExpire > 30000) |
236 | DoExpire(); | 236 | DoExpire(); |
237 | 237 | ||
238 | SqliteCommand cmd = new SqliteCommand("update tokens set validity = datetime('now, 'localtime', '+" + lifetime.ToString() + | 238 | SqliteCommand cmd = new SqliteCommand("update tokens set validity = datetime('now', 'localtime', '+" + lifetime.ToString() + |
239 | " minutes') where UUID = '" + principalID.ToString() + "' and token = '" + token + "' and validity > datetime('now', 'localtime')"); | 239 | " minutes') where UUID = '" + principalID.ToString() + "' and token = '" + token + "' and validity > datetime('now', 'localtime')"); |
240 | 240 | ||
241 | if (ExecuteNonQuery(cmd, m_Connection) > 0) | 241 | if (ExecuteNonQuery(cmd, m_Connection) > 0) |
diff --git a/OpenSim/Data/SQLite/SQLiteUserAccountData.cs b/OpenSim/Data/SQLite/SQLiteUserAccountData.cs index 50e8c23..67cf716 100644 --- a/OpenSim/Data/SQLite/SQLiteUserAccountData.cs +++ b/OpenSim/Data/SQLite/SQLiteUserAccountData.cs | |||
@@ -66,7 +66,7 @@ namespace OpenSim.Data.SQLite | |||
66 | 66 | ||
67 | if (words.Length == 1) | 67 | if (words.Length == 1) |
68 | { | 68 | { |
69 | cmd.CommandText = String.Format("select * from {0} where ScopeID='{1}' or ScopeID='00000000-0000-0000-0000-000000000000') and (FirstName like '{2}%' or LastName like '{2}%')", | 69 | cmd.CommandText = String.Format("select * from {0} where (ScopeID='{1}' or ScopeID='00000000-0000-0000-0000-000000000000') and (FirstName like '{2}%' or LastName like '{2}%')", |
70 | m_Realm, scopeID.ToString(), words[0]); | 70 | m_Realm, scopeID.ToString(), words[0]); |
71 | } | 71 | } |
72 | else | 72 | else |