Project

General

Profile

Patch #3882 ยป add_search_user_by_mail.patch

Lucas Panjer, 2009-09-16 21:48

View differences:

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)
    (1-1/1)