Replaces User.find_active with a named scope.

git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@2079 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
Jean-Philippe Lang
2008-11-30 16:57:56 +00:00
parent 9572699301
commit e7b6a56a97
7 changed files with 10 additions and 19 deletions
+1 -1
View File
@@ -46,7 +46,7 @@ class ApplicationController < ActionController::Base
def find_current_user
if session[:user_id]
# existing session
(User.find_active(session[:user_id]) rescue nil)
(User.active.find(session[:user_id]) rescue nil)
elsif cookies[:autologin] && Setting.autologin?
# auto-login feature
User.find_by_autologin_key(cookies[:autologin])