summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorjessib <jessib@riseup.net>2013-12-16 11:37:05 -0800
committerjessib <jessib@riseup.net>2013-12-16 11:37:05 -0800
commit6012b588911dac3d47bbdb53e11dcb70ba8be6df (patch)
tree01b484556275a1faa58587869d339f2b8d7886e5
parente2638a3a91cb2c6a426f856c4d1919be1a852b6a (diff)
Fix issue 4756: /login should not crash if one goes there when logged in.
-rw-r--r--users/app/controllers/sessions_controller.rb1
1 files changed, 1 insertions, 0 deletions
diff --git a/users/app/controllers/sessions_controller.rb b/users/app/controllers/sessions_controller.rb
index 85a022e..ca228c2 100644
--- a/users/app/controllers/sessions_controller.rb
+++ b/users/app/controllers/sessions_controller.rb
@@ -1,6 +1,7 @@
class SessionsController < ApplicationController
def new
+ redirect_to root_path if logged_in?
@session = Session.new
if authentication_errors
@errors = authentication_errors