mirror of
https://github.com/moparisthebest/user_sql
synced 2024-11-26 11:02:23 -05:00
Fix a bug where user list was empty when no search was performed
This commit is contained in:
parent
f1d65bb84a
commit
74069232bb
@ -1 +1 @@
|
|||||||
0.2
|
0.3
|
||||||
|
@ -137,7 +137,13 @@ class OC_USER_SQL extends OC_User_Backend implements OC_User_Interface {
|
|||||||
if($search != '')
|
if($search != '')
|
||||||
$query .= " WHERE $this->sql_column_username LIKE '%$search%'";
|
$query .= " WHERE $this->sql_column_username LIKE '%$search%'";
|
||||||
if($this->sql_column_active != '')
|
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)
|
if($limit != null)
|
||||||
$query .= " LIMIT $limit";
|
$query .= " LIMIT $limit";
|
||||||
if($offset != null)
|
if($offset != null)
|
||||||
|
Loading…
Reference in New Issue
Block a user