##// END OF EJS Templates
lost_password option checking in account controller...
Jean-Philippe Lang -
r233:d185e2f9e015
parent child
Show More
@@ -22,7 +22,7 class AccountController < ApplicationController
22 22
23 23 # prevents login action to be filtered by check_if_login_required application scope filter
24 24 skip_before_filter :check_if_login_required, :only => [:login, :lost_password, :register]
25 before_filter :require_login, :except => [:show, :login, :lost_password, :register]
25 before_filter :require_login, :only => :logout
26 26
27 27 # Show user's account
28 28 def show
@@ -57,6 +57,7 class AccountController < ApplicationController
57 57
58 58 # Enable user to choose a new password
59 59 def lost_password
60 redirect_to :controller => 'welcome' and return unless Setting.lost_password?
60 61 if params[:token]
61 62 @token = Token.find_by_action_and_value("recovery", params[:token])
62 63 redirect_to :controller => 'welcome' and return unless @token and !@token.expired?
General Comments 0
You need to be logged in to leave comments. Login now