mirror of
https://github.com/moparisthebest/user_sql
synced 2024-11-24 01:52:18 -05:00
Fix typo and searching for users when domain mapping is active
This commit is contained in:
parent
3aa9c2020f
commit
17cacd6141
@ -9,7 +9,7 @@ OCP\JSON::checkAppEnabled('user_sql');
|
||||
// CSRF checks
|
||||
OCP\JSON::callCheck();
|
||||
|
||||
$l = new OC_L10N('use_sql');
|
||||
$l = new OC_L10N('user_sql');
|
||||
|
||||
$params = array('sql_host', 'sql_user', 'sql_database', 'sql_password',
|
||||
'sql_table', 'sql_column_username', 'sql_column_password', 'sql_type',
|
||||
|
@ -282,7 +282,6 @@ class OC_USER_SQL extends OC_User_Backend implements OC_User_Interface
|
||||
return false;
|
||||
}
|
||||
$query = "SELECT $this->sql_column_username FROM $this->sql_table";
|
||||
$search = $this -> doUserDomainMapping($search);
|
||||
if($search != '')
|
||||
$query .= " WHERE $this->sql_column_username LIKE :search";
|
||||
if($this -> sql_column_active != '')
|
||||
@ -308,7 +307,7 @@ class OC_USER_SQL extends OC_User_Backend implements OC_User_Interface
|
||||
$result = $this -> db -> prepare($query);
|
||||
if($search != '')
|
||||
{
|
||||
$search = "%$search%";
|
||||
$search = "%".$this -> doUserDomainMapping($search."%")."%";
|
||||
$result -> bindParam(":search", $search);
|
||||
}
|
||||
OC_Log::write('OC_USER_SQL', "Executing query...", OC_Log::DEBUG);
|
||||
|
Loading…
Reference in New Issue
Block a user