diff options
author | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2007-02-04 15:55:29 +0000 |
---|---|---|
committer | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2007-02-04 15:55:29 +0000 |
commit | d185e2f9e01581ea3d981648cfdd5c4d37209426 (patch) | |
tree | 2c8e4e8488943d8858cb5cd9f78278bed9d8ee25 /app | |
parent | 2b7c31feb50469ea8512ebf52e2b2c8f6239accb (diff) | |
download | redmine-d185e2f9e01581ea3d981648cfdd5c4d37209426.tar.gz redmine-d185e2f9e01581ea3d981648cfdd5c4d37209426.zip |
lost_password option checking in account controller
git-svn-id: http://redmine.rubyforge.org/svn/trunk@236 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'app')
-rw-r--r-- | app/controllers/account_controller.rb | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/app/controllers/account_controller.rb b/app/controllers/account_controller.rb index 3712ef7e1..e561e151a 100644 --- a/app/controllers/account_controller.rb +++ b/app/controllers/account_controller.rb @@ -22,7 +22,7 @@ class AccountController < ApplicationController # prevents login action to be filtered by check_if_login_required application scope filter
skip_before_filter :check_if_login_required, :only => [:login, :lost_password, :register]
- before_filter :require_login, :except => [:show, :login, :lost_password, :register]
+ before_filter :require_login, :only => :logout
# Show user's account
def show
@@ -57,6 +57,7 @@ class AccountController < ApplicationController # Enable user to choose a new password
def lost_password
+ redirect_to :controller => 'welcome' and return unless Setting.lost_password?
if params[:token]
@token = Token.find_by_action_and_value("recovery", params[:token])
redirect_to :controller => 'welcome' and return unless @token and !@token.expired?
|