We only want to redirect to the alternate logout screen if this was an intended logout.
authorJan <jan@horde.org>
Mon, 5 Jul 2010 16:45:43 +0000 (17:45 +0100)
committerJan Schneider <jan@horde.org>
Mon, 5 Jul 2010 16:56:24 +0000 (18:56 +0200)
horde/login.php

index 72f537f..012d6e3 100644 (file)
@@ -155,8 +155,10 @@ if ($error_reason) {
     Horde::logMessage($entry, 'NOTICE');
     $registry->clearAuth();
 
-    /* Redirect the user on logout if redirection is enabled. */
-    if (!empty($conf['auth']['redirect_on_logout'])) {
+    /* Redirect the user on logout if redirection is enabled and this is an
+     * an intended logout. */
+    if ($error_reason == Horde_Auth::REASON_LOGOUT &&
+        !empty($conf['auth']['redirect_on_logout'])) {
         $logout_url = new Horde_Url($conf['auth']['redirect_on_logout'], true);
         if (!isset($_COOKIE[session_name()])) {
             $logout_url->add(session_name(), session_id());