Commit d185e2f9 authored by Jean-Philippe Lang's avatar Jean-Philippe Lang

lost_password option checking in account controller

git-svn-id: http://redmine.rubyforge.org/svn/trunk@236 e93f8b46-1217-0410-a6f0-8f06a7374b81
parent 2b7c31fe
......@@ -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?
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment