diff options
author | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2007-09-24 18:38:45 +0000 |
---|---|---|
committer | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2007-09-24 18:38:45 +0000 |
commit | 650888c73b734dc9e7bf9ce4a20cb05de68c45a1 (patch) | |
tree | 05ff46d3f804c1699fb099184c90e7413ddbf03d /app/controllers/account_controller.rb | |
parent | 042ef42da0efb38b224a045cd6d03649b979a494 (diff) | |
download | redmine-650888c73b734dc9e7bf9ce4a20cb05de68c45a1.tar.gz redmine-650888c73b734dc9e7bf9ce4a20cb05de68c45a1.zip |
Added a named route for the home page.
git-svn-id: http://redmine.rubyforge.org/svn/trunk@760 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'app/controllers/account_controller.rb')
-rw-r--r-- | app/controllers/account_controller.rb | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/app/controllers/account_controller.rb b/app/controllers/account_controller.rb index 44e4cc221..e8e70076b 100644 --- a/app/controllers/account_controller.rb +++ b/app/controllers/account_controller.rb @@ -63,15 +63,15 @@ class AccountController < ApplicationController cookies.delete :autologin Token.delete_all(["user_id = ? AND action = ?", User.current.id, 'autologin']) if User.current.logged? self.logged_user = nil - redirect_to :controller => 'welcome' + redirect_to home_url end # Enable user to choose a new password def lost_password - redirect_to :controller => 'welcome' and return unless Setting.lost_password? + redirect_to(home_url) && 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? + redirect_to(home_url) && return unless @token and !@token.expired? @user = @token.user if request.post? @user.password, @user.password_confirmation = params[:new_password], params[:new_password_confirmation] @@ -105,12 +105,12 @@ class AccountController < ApplicationController # User self-registration def register - redirect_to :controller => 'welcome' and return unless Setting.self_registration? + redirect_to(home_url) && return unless Setting.self_registration? if params[:token] token = Token.find_by_action_and_value("register", params[:token]) - redirect_to :controller => 'welcome' and return unless token and !token.expired? + redirect_to(home_url) && return unless token and !token.expired? user = token.user - redirect_to :controller => 'welcome' and return unless user.status == User::STATUS_REGISTERED + redirect_to(home_url) && return unless user.status == User::STATUS_REGISTERED user.status = User::STATUS_ACTIVE if user.save token.destroy |