1
0
mirror of https://github.com/moparisthebest/user_sql synced 2024-11-22 17:22:14 -05:00

Fix a bug where user list was empty when no search was performed

This commit is contained in:
Andreas Boehler 2012-11-30 11:21:10 +01:00
parent f1d65bb84a
commit 74069232bb
2 changed files with 8 additions and 2 deletions

View File

@ -1 +1 @@
0.2
0.3

View File

@ -137,7 +137,13 @@ class OC_USER_SQL extends OC_User_Backend implements OC_User_Interface {
if($search != '')
$query .= " WHERE $this->sql_column_username LIKE '%$search%'";
if($this->sql_column_active != '')
$query .= " AND $this->sql_column_active = 1";
{
if($search != '')
$query .= " AND";
else
$query .= " WHERE";
$query .= " $this->sql_column_active = 1";
}
if($limit != null)
$query .= " LIMIT $limit";
if($offset != null)