Fixed issues with searching by username (#1722)

* Fixed issues with searching by username

* Update admin_user_search.php

* Update CHANGELOG.md
This commit is contained in:
Roman Kelesidis 2024-12-21 19:15:13 +07:00 committed by GitHub
commit 1914e7be30
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 5 additions and 7 deletions

View file

@ -252,8 +252,7 @@ if (!isset($_REQUEST['dosearch'])) {
$text = sprintf($lang['SEARCH_FOR_USERNAME'], strip_tags(htmlspecialchars(stripslashes($username))));
$username = str_replace("\*", '%', trim(strip_tags(strtolower($username))));
$username = str_replace('*', '%', trim(strip_tags(strtolower($username))));
if (str_contains($username, '%')) {
$op = 'LIKE';
} else {
@ -273,8 +272,7 @@ if (!isset($_REQUEST['dosearch'])) {
$text = sprintf($lang['SEARCH_FOR_EMAIL'], strip_tags(htmlspecialchars(stripslashes($email))));
$email = str_replace("\*", '%', trim(strip_tags(strtolower($email))));
$email = str_replace('*', '%', trim(strip_tags(strtolower($email))));
if (str_contains($email, '%')) {
$op = 'LIKE';
} else {
@ -568,8 +566,7 @@ if (!isset($_REQUEST['dosearch'])) {
$text = strip_tags(htmlspecialchars(stripslashes($userfield_value)));
$userfield_value = str_replace("\*", '%', trim(strip_tags(strtolower($userfield_value))));
$userfield_value = str_replace('*', '%', trim(strip_tags(strtolower($userfield_value))));
if (str_contains($userfield_value, '%')) {
$op = 'LIKE';
} else {