aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Data/SQLite/SQLiteUserAccountData.cs
diff options
context:
space:
mode:
authorubit2012-12-03 21:26:36 +0100
committerubit2012-12-03 21:26:36 +0100
commit5d4b7d537d872d27c394402d3483c2a9bd2153f0 (patch)
tree39aae50386555bf024700314fb7bee5121a9d683 /OpenSim/Data/SQLite/SQLiteUserAccountData.cs
parentMerge branch 'ubitwork' of ssh://3dhosting.de/var/git/careminster into ubitwork (diff)
parentMerge branch 'avination' into ubitwork (diff)
downloadopensim-SC-5d4b7d537d872d27c394402d3483c2a9bd2153f0.zip
opensim-SC-5d4b7d537d872d27c394402d3483c2a9bd2153f0.tar.gz
opensim-SC-5d4b7d537d872d27c394402d3483c2a9bd2153f0.tar.bz2
opensim-SC-5d4b7d537d872d27c394402d3483c2a9bd2153f0.tar.xz
Merge branch 'ubitwork' of ssh://3dhosting.de/var/git/careminster into ubitwork
Diffstat (limited to 'OpenSim/Data/SQLite/SQLiteUserAccountData.cs')
-rw-r--r--OpenSim/Data/SQLite/SQLiteUserAccountData.cs25
1 files changed, 13 insertions, 12 deletions
diff --git a/OpenSim/Data/SQLite/SQLiteUserAccountData.cs b/OpenSim/Data/SQLite/SQLiteUserAccountData.cs
index 4d580c0..91d62ce 100644
--- a/OpenSim/Data/SQLite/SQLiteUserAccountData.cs
+++ b/OpenSim/Data/SQLite/SQLiteUserAccountData.cs
@@ -66,20 +66,21 @@ namespace OpenSim.Data.SQLite
66 if (words.Length > 2) 66 if (words.Length > 2)
67 return new UserAccountData[0]; 67 return new UserAccountData[0];
68 68
69 SqliteCommand cmd = new SqliteCommand(); 69 using (SqliteCommand cmd = new SqliteCommand())
70
71 if (words.Length == 1)
72 {
73 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}%')",
74 m_Realm, scopeID.ToString(), words[0]);
75 }
76 else
77 { 70 {
78 cmd.CommandText = String.Format("select * from {0} where (ScopeID='{1}' or ScopeID='00000000-0000-0000-0000-000000000000') and (FirstName like '{2}%' or LastName like '{3}%')", 71 if (words.Length == 1)
79 m_Realm, scopeID.ToString(), words[0], words[1]); 72 {
80 } 73 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}%')",
74 m_Realm, scopeID.ToString(), words[0]);
75 }
76 else
77 {
78 cmd.CommandText = String.Format("select * from {0} where (ScopeID='{1}' or ScopeID='00000000-0000-0000-0000-000000000000') and (FirstName like '{2}%' or LastName like '{3}%')",
79 m_Realm, scopeID.ToString(), words[0], words[1]);
80 }
81 81
82 return DoQuery(cmd); 82 return DoQuery(cmd);
83 }
83 } 84 }
84 85
85 public UserAccountData[] GetUsersWhere(UUID scopeID, string where) 86 public UserAccountData[] GetUsersWhere(UUID scopeID, string where)