From 10f2e70dbac49765f8a524f1714f15cad4fa503b Mon Sep 17 00:00:00 2001 From: Toshi MARUYAMA Date: Wed, 31 Aug 2011 12:08:29 +0000 Subject: [PATCH] remove trailing white-spaces from app/controllers/account_controller.rb. git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@6900 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- app/controllers/account_controller.rb | 35 +++++++++++++-------------- 1 file changed, 17 insertions(+), 18 deletions(-) diff --git a/app/controllers/account_controller.rb b/app/controllers/account_controller.rb index 0c645e555..964b20d99 100644 --- a/app/controllers/account_controller.rb +++ b/app/controllers/account_controller.rb @@ -1,24 +1,24 @@ # Redmine - project management software -# Copyright (C) 2006-2009 Jean-Philippe Lang +# Copyright (C) 2006-2011 Jean-Philippe Lang # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; either version 2 # of the License, or (at your option) any later version. -# +# # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. -# +# # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. class AccountController < ApplicationController helper :custom_fields - include CustomFieldsHelper - + include CustomFieldsHelper + # prevents login action to be filtered by check_if_login_required application scope filter skip_before_filter :check_if_login_required @@ -36,7 +36,7 @@ class AccountController < ApplicationController logout_user redirect_to home_url end - + # Enable user to choose a new password def lost_password redirect_to(home_url) && return unless Setting.lost_password? @@ -51,7 +51,7 @@ class AccountController < ApplicationController flash[:notice] = l(:notice_account_password_updated) redirect_to :action => 'login' return - end + end end render :template => "account/password_recovery" return @@ -73,7 +73,7 @@ class AccountController < ApplicationController end end end - + # User self-registration def register redirect_to(home_url) && return unless Setting.self_registration? || session[:auth_source_registration] @@ -109,7 +109,7 @@ class AccountController < ApplicationController end end end - + # Token based account activation def activate redirect_to(home_url) && return unless Setting.self_registration? && params[:token] @@ -124,9 +124,9 @@ class AccountController < ApplicationController end redirect_to :action => 'login' end - + private - + def logout_user if User.current.logged? cookies.delete :autologin @@ -134,7 +134,7 @@ class AccountController < ApplicationController self.logged_user = nil end end - + def authenticate_user if Setting.openid? && using_open_id? open_id_authenticate(params[:openid_url]) @@ -156,7 +156,6 @@ class AccountController < ApplicationController end end - def open_id_authenticate(openid_url) authenticate_with_open_id(openid_url, :required => [:nickname, :fullname, :email], :return_to => signin_url) do |result, identity_url, registration| if result.successful? @@ -185,7 +184,7 @@ class AccountController < ApplicationController register_manually_by_administrator(user) do onthefly_creation_failed(user) end - end + end else # Existing record if user.active? @@ -197,7 +196,7 @@ class AccountController < ApplicationController end end end - + def successful_authentication(user) # Valid user self.logged_user = user @@ -208,7 +207,7 @@ class AccountController < ApplicationController call_hook(:controller_account_success_authentication_after, {:user => user }) redirect_back_or_default :controller => 'my', :action => 'page' end - + def set_autologin_cookie(user) token = Token.create(:user => user, :action => 'autologin') cookie_name = Redmine::Configuration['autologin_cookie_name'] || 'autologin' @@ -247,7 +246,7 @@ class AccountController < ApplicationController yield if block_given? end end - + # Automatically register a user # # Pass a block for behavior when a user fails to save @@ -263,7 +262,7 @@ class AccountController < ApplicationController yield if block_given? end end - + # Manual activation by the administrator # # Pass a block for behavior when a user fails to save -- 2.39.5