Patch #3882 ยป add_search_user_by_mail.patch
app/controllers/users_controller.rb (working copy) | ||
---|---|---|
37 | 37 | |
38 | 38 |
unless params[:name].blank? |
39 | 39 |
name = "%#{params[:name].strip.downcase}%" |
40 |
c << ["LOWER(login) LIKE ? OR LOWER(firstname) LIKE ? OR LOWER(lastname) LIKE ?", name, name, name]
|
|
40 |
c << ["LOWER(login) LIKE ? OR LOWER(firstname) LIKE ? OR LOWER(lastname) LIKE ? OR LOWER(mail) LIKE ?", name, name, name, name]
|
|
41 | 41 |
end |
42 | 42 |
|
43 | 43 |
@user_count = User.count(:conditions => c.conditions) |