From 70b4825ed77a6552531f3ebf3087239aeb8f55a1 Mon Sep 17 00:00:00 2001 From: Jan Date: Mon, 5 Jul 2010 17:45:43 +0100 Subject: [PATCH] We only want to redirect to the alternate logout screen if this was an intended logout. --- horde/login.php | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/horde/login.php b/horde/login.php index 72f537f4a..012d6e3ec 100644 --- a/horde/login.php +++ b/horde/login.php @@ -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()); -- 2.11.0