diff --git a/app/models/team.rb b/app/models/team.rb index d635679f7..cb8fd7955 100644 --- a/app/models/team.rb +++ b/app/models/team.rb @@ -55,7 +55,9 @@ class Team < ActiveRecord::Base def search_users(query = nil) a_query = "%#{query}%" users.where.not(confirmed_at: nil) - .where('full_name LIKE ? OR email LIKE ?', a_query, a_query) + .where('lower(full_name) LIKE ? OR lower(email) LIKE ?', + a_query.downcase, + a_query.downcase) end # Imports samples into db