OSDN Git Service

Add mail field to admin user search filter (#3882).
authorJean-Philippe Lang <jp_lang@yahoo.fr>
Sat, 24 Oct 2009 12:21:09 +0000 (12:21 +0000)
committerJean-Philippe Lang <jp_lang@yahoo.fr>
Sat, 24 Oct 2009 12:21:09 +0000 (12:21 +0000)
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@2963 e93f8b46-1217-0410-a6f0-8f06a7374b81

app/controllers/users_controller.rb

index 0abda0c..776efb0 100644 (file)
@@ -37,7 +37,7 @@ class UsersController < ApplicationController
 
     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)