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:
@@ -24,7 +24,7 @@ class AccountController < ApplicationController
|
||||
|
||||
# Show user's account
|
||||
def show
|
||||
@user = User.find_active(params[:id])
|
||||
@user = User.active.find(params[:id])
|
||||
@custom_values = @user.custom_values
|
||||
|
||||
# show only public projects and private projects that the logged in user is also a member of
|
||||
|
||||
@@ -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])
|
||||
|
||||
@@ -227,7 +227,7 @@ class ProjectsController < ApplicationController
|
||||
@date_to ||= Date.today + 1
|
||||
@date_from = @date_to - @days
|
||||
@with_subprojects = params[:with_subprojects].nil? ? Setting.display_subprojects_issues? : (params[:with_subprojects] == '1')
|
||||
@author = (params[:user_id] ? User.find_active(params[:user_id]) : nil)
|
||||
@author = (params[:user_id] ? User.active.find(params[:user_id]) : nil)
|
||||
|
||||
@activity = Redmine::Activity::Fetcher.new(User.current, :project => @project,
|
||||
:with_subprojects => @with_subprojects,
|
||||
|
||||
Reference in New Issue
Block a user