diff options
Diffstat (limited to 'Bugzilla/User.pm')
-rw-r--r-- | Bugzilla/User.pm | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/Bugzilla/User.pm b/Bugzilla/User.pm index 0c2de0f4c..c9817a4d9 100644 --- a/Bugzilla/User.pm +++ b/Bugzilla/User.pm @@ -682,18 +682,18 @@ sub match { && (length($str) >= 3)) { - my $sqlstr = &::SqlQuote(uc($str)); + my $sqlstr = &::SqlQuote(lc($str)); - my $query = "SELECT DISTINCT userid, realname, login_name, " .
+ my $query = "SELECT DISTINCT userid, realname, login_name, " . "LENGTH(login_name) AS namelength " . "FROM profiles"; if (&::Param('usevisibilitygroups')) { $query .= ", user_group_map"; } - $query .= " WHERE " . $dbh->sql_position($sqlstr, - "UPPER(login_name)") . - " OR " . $dbh->sql_position($sqlstr, - "UPPER(realname)"); + $query .= " WHERE " . + $dbh->sql_position($sqlstr, 'LOWER(login_name)') . " > 0" . + " OR " . + $dbh->sql_position($sqlstr, 'LOWER(realname)') . " > 0"; if (&::Param('usevisibilitygroups')) { $query .= " AND user_group_map.user_id = userid" . " AND isbless = 0" . |