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