From 5700991eb7c77ca29956be4f25fc37a79fa81cfb Mon Sep 17 00:00:00 2001 From: Igor Zubkov Date: Sat, 24 Dec 2011 03:48:32 +0200 Subject: [PATCH] Fix welcome controller --- lib/redmine_landing_page/patches/welcome_controller_patch.rb | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lib/redmine_landing_page/patches/welcome_controller_patch.rb b/lib/redmine_landing_page/patches/welcome_controller_patch.rb index f2003bf..b146654 100644 --- a/lib/redmine_landing_page/patches/welcome_controller_patch.rb +++ b/lib/redmine_landing_page/patches/welcome_controller_patch.rb @@ -8,7 +8,9 @@ module RedmineLandingPage alias_method :index_without_landing_page, :index unless method_defined? :index_without_landing_page def index - if User.current.logged? && !User.current.landing_page.empty? + if User.current.logged? && + User.current.landing_page && + !User.current.landing_page.empty? redirect_to User.current.landing_page, :status => 302 else index_without_landing_page