From 4bf5158d4358dea80b44767dfe4a28110be8a521 Mon Sep 17 00:00:00 2001
From: Sam Nicholls <msn@central.aber.ac.uk>
Date: Fri, 8 Apr 2011 12:06:55 +0100
Subject: [PATCH] Modified actions/login.php to redirect logged in users who
 hit login/ to the site index.

Removed the throwing of a clientError in favour of a common_redirect to
index to fix Issue 2990: "If logged in, just redirect to home page on
/login"
---
 actions/login.php | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/actions/login.php b/actions/login.php
index 7ec9c32139..dcf9b53936 100644
--- a/actions/login.php
+++ b/actions/login.php
@@ -94,8 +94,7 @@ class LoginAction extends Action
         parent::handle($args);
 
         if (common_is_real_login()) {
-            // TRANS: Client error displayed when trying to log in while already logged in.
-            $this->clientError(_('Already logged in.'));
+            common_redirect(common_local_url('index'));
         } else if ($_SERVER['REQUEST_METHOD'] == 'POST') {
             $this->checkLogin();
         } else {
-- 
2.39.5