From b7f22a22944d73d9c43531f2b52c8bea636865d0 Mon Sep 17 00:00:00 2001 From: Jan Schneider Date: Mon, 20 Sep 2010 11:21:48 +0200 Subject: [PATCH] Allow authentication drivers to explicity throw a REASON_MESSAGE exception. --- framework/Auth/lib/Horde/Auth/Base.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/framework/Auth/lib/Horde/Auth/Base.php b/framework/Auth/lib/Horde/Auth/Base.php index a52d0bf14..c1fe00872 100644 --- a/framework/Auth/lib/Horde/Auth/Base.php +++ b/framework/Auth/lib/Horde/Auth/Base.php @@ -111,8 +111,9 @@ abstract class Horde_Auth_Base $this->setCredential('credentials', $credentials); return true; } catch (Horde_Auth_Exception $e) { - if ($e->getCode()) { - $this->setError($e->getCode()); + if (($code = $e->getCode()) && + $code != Horde_Auth::REASON_MESSAGE) { + $this->setError($code); } else { $this->setError(Horde_Auth::REASON_MESSAGE, $e->getMessage()); } -- 2.11.0