1
0
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:
Andreas Boehler 2015-01-08 21:18:57 +01:00
parent 3aa9c2020f
commit 17cacd6141
2 changed files with 2 additions and 3 deletions

View File

@ -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',

View File

@ -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);