From a8d65b8dbf864deedda2eb304b3d21d7f7fc1e0c Mon Sep 17 00:00:00 2001 From: Tom Hughes Date: Sun, 29 Sep 2013 15:43:34 +0100 Subject: [PATCH 1/1] Don't redirect from user#terms to login if the user is logged in --- app/controllers/user_controller.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/controllers/user_controller.rb b/app/controllers/user_controller.rb index 325d7b3fe..3d97c58f1 100644 --- a/app/controllers/user_controller.rb +++ b/app/controllers/user_controller.rb @@ -30,7 +30,7 @@ class UserController < ApplicationController if @user and @user.terms_agreed? # Already agreed to terms, so just show settings redirect_to :action => :account, :display_name => @user.display_name - elsif session[:new_user].nil? + elsif @user.nil? and session[:new_user].nil? redirect_to :action => :login, :referer => request.fullpath end end -- 2.43.2