From b8af1a76c0067ef77eccfb07958aa69cd25e59fe Mon Sep 17 00:00:00 2001 From: "Duck (Jakob Munih)" Date: Wed, 30 Sep 2009 16:59:11 +0200 Subject: [PATCH] We must throw an exeption on bad login --- folks/lib/Application.php | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/folks/lib/Application.php b/folks/lib/Application.php index 654caf5a7..e91f4988d 100644 --- a/folks/lib/Application.php +++ b/folks/lib/Application.php @@ -27,13 +27,16 @@ class Folks_Application extends Horde_Registry_Application * @param string $userID Username * @param array $credentials Array of criedentials (password requied) * - * @return boolean Whether IMP authentication was successful. + * @return boolean Whether Folks authentication was successful. */ public function authAuthenticate($userID, $credentials) { require_once dirname(__FILE__) . '/base.php'; - return $GLOBALS['folks_driver']->comparePassword($userID, $credentials['password']); + $result = $GLOBALS['folks_driver']->comparePassword($userID, $credentials['password']); + if ($result !== true) { + throw new Horde_Auth_Exception('', Horde_Auth::REASON_BADLOGIN); + } } /** -- 2.11.0