summaryrefslogtreecommitdiff
path: root/app/models/user.rb
diff options
context:
space:
mode:
authorJacob Schatz <jschatz@gitlab.com>2018-02-23 20:36:28 +0000
committerJacob Schatz <jschatz@gitlab.com>2018-02-23 20:36:28 +0000
commita90a22a7743028a260d7b1f3105b80700a10287e (patch)
treebebc8c433c47000c0eac1426150de70a74206992 /app/models/user.rb
parent11aa990da7794038aef09dd023b85e81b5ac6c4f (diff)
parent296a4e6825a3528917bb385123cdf62ae3d1944e (diff)
downloadgitlab-ce-a90a22a7743028a260d7b1f3105b80700a10287e.tar.gz
Merge branch 'master' into 'boards-bundle-refactor'
# Conflicts: # config/webpack.config.js
Diffstat (limited to 'app/models/user.rb')
-rw-r--r--app/models/user.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/app/models/user.rb b/app/models/user.rb
index f5eeba27572..8610ca27b7f 100644
--- a/app/models/user.rb
+++ b/app/models/user.rb
@@ -327,8 +327,8 @@ class User < ActiveRecord::Base
SQL
where(
- fuzzy_arel_match(:name, query)
- .or(fuzzy_arel_match(:username, query))
+ fuzzy_arel_match(:name, query, lower_exact_match: true)
+ .or(fuzzy_arel_match(:username, query, lower_exact_match: true))
.or(arel_table[:email].eq(query))
).reorder(order % { query: ActiveRecord::Base.connection.quote(query) }, :name)
end