mirror of
https://github.com/moparisthebest/user_sql
synced 2024-11-27 19:42:23 -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
|
// CSRF checks
|
||||||
OCP\JSON::callCheck();
|
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',
|
$params = array('sql_host', 'sql_user', 'sql_database', 'sql_password',
|
||||||
'sql_table', 'sql_column_username', 'sql_column_password', 'sql_type',
|
'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;
|
return false;
|
||||||
}
|
}
|
||||||
$query = "SELECT $this->sql_column_username FROM $this->sql_table";
|
$query = "SELECT $this->sql_column_username FROM $this->sql_table";
|
||||||
$search = $this -> doUserDomainMapping($search);
|
|
||||||
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 != '')
|
||||||
@ -308,7 +307,7 @@ class OC_USER_SQL extends OC_User_Backend implements OC_User_Interface
|
|||||||
$result = $this -> db -> prepare($query);
|
$result = $this -> db -> prepare($query);
|
||||||
if($search != '')
|
if($search != '')
|
||||||
{
|
{
|
||||||
$search = "%$search%";
|
$search = "%".$this -> doUserDomainMapping($search."%")."%";
|
||||||
$result -> bindParam(":search", $search);
|
$result -> bindParam(":search", $search);
|
||||||
}
|
}
|
||||||
OC_Log::write('OC_USER_SQL', "Executing query...", OC_Log::DEBUG);
|
OC_Log::write('OC_USER_SQL', "Executing query...", OC_Log::DEBUG);
|
||||||
|
Loading…
Reference in New Issue
Block a user