From 7775c19a9b0b32cead81d6f8b13f26acf8e51a72 Mon Sep 17 00:00:00 2001 From: Michael M Slusarz Date: Wed, 30 Jun 2010 14:33:35 -0600 Subject: [PATCH] Fix determination of authentication error. --- horde/login.php | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/horde/login.php b/horde/login.php index 0501380ef..d283acaab 100644 --- a/horde/login.php +++ b/horde/login.php @@ -46,9 +46,9 @@ function _addAnchor($url, $type, $vars, $url_anchor = null) return $url; } -function _getLogoutReasonString($code, $auth, $vars) +function _getLogoutReasonString($auth, $vars) { - switch ($code) { + switch ($auth->getError()) { case Horde_Auth::REASON_SESSION: return _("Your session has expired. Please login again."); @@ -221,8 +221,6 @@ if ($error_reason) { exit; } - $error_reason = $auth->getError(); - $entry = sprintf('FAILED LOGIN for %s [%s] to Horde', $vars->horde_user, $_SERVER['REMOTE_ADDR']); Horde::logMessage($entry, 'ERR'); @@ -274,7 +272,7 @@ if (!$is_auth && !$prefs->isLocked('language')) { } $title = _("Log in"); -if ($reason = _getLogoutReasonString($error_reason, $auth, $vars)) { +if ($reason = _getLogoutReasonString($auth, $vars)) { $notification->push(str_replace('
', ' ', $reason), 'horde.message'); } -- 2.11.0