This commit is contained in:
Shish 2017-09-17 19:10:10 +01:00
parent 2c0e49507e
commit 5763b77e2b

View file

@ -122,12 +122,12 @@ class UserPage extends Extension {
$a = array("offset"=>$offset, "limit"=>$limit);
if(@$_GET['username']) {
$q .= " AND name LIKE :name";
$q .= " AND SCORE_STRNORM(name) LIKE SCORE_STRNORM(:name)";
$a["name"] = '%' . $_GET['username'] . '%';
}
if(@$_GET['email']) {
$q .= " AND name LIKE :email";
$q .= " AND SCORE_STRNORM(name) LIKE SCORE_STRNORM(:email)";
$a["email"] = '%' . $_GET['email'] . '%';
}
@ -138,7 +138,7 @@ class UserPage extends Extension {
$q .= " LIMIT :limit OFFSET :offset";
$rows = $database->get_all($q, $a);
$rows = $database->get_all($database->scoreql_to_sql($q), $a);
$users = array_map("_new_user", $rows);
$this->theme->display_user_list($page, $users, $user);
}