From: Jan Schneider Date: Mon, 20 Sep 2010 09:21:48 +0000 (+0200) Subject: Allow authentication drivers to explicity throw a REASON_MESSAGE exception. X-Git-Url: https://git.internetallee.de/?a=commitdiff_plain;h=b7f22a22944d73d9c43531f2b52c8bea636865d0;p=horde.git Allow authentication drivers to explicity throw a REASON_MESSAGE exception. --- 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()); }