From 5763b77e2b5f69b7f6a9482612c00c04b075d23d Mon Sep 17 00:00:00 2001 From: Shish Date: Sun, 17 Sep 2017 19:10:10 +0100 Subject: [PATCH] strnorm --- ext/user/main.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/ext/user/main.php b/ext/user/main.php index c3c8f776..44fdda31 100644 --- a/ext/user/main.php +++ b/ext/user/main.php @@ -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); }