Fix propogation of auth error message
authorMichael M Slusarz <slusarz@curecanti.org>
Wed, 14 Apr 2010 06:23:10 +0000 (00:23 -0600)
committerMichael M Slusarz <slusarz@curecanti.org>
Wed, 14 Apr 2010 20:03:51 +0000 (14:03 -0600)
framework/Auth/lib/Horde/Auth/Application.php
horde/login.php

index ea8268e..9747f30 100644 (file)
@@ -119,11 +119,7 @@ class Horde_Auth_Application extends Horde_Auth_Base
 
         $credentials['auth_ob'] = $this;
 
-        try {
-            $result = $GLOBALS['registry']->callAppMethod($this->_app, $this->_apiMethods['authenticate'], array('args' => array($userId, $credentials), 'noperms' => true));
-        } catch (Horde_Auth_Exception $e) {
-            throw new Horde_Auth_Exception('', Horde_Auth::REASON_BADLOGIN);
-        }
+        $GLOBALS['registry']->callAppMethod($this->_app, $this->_apiMethods['authenticate'], array('args' => array($userId, $credentials), 'noperms' => true));
     }
 
     /**
index c6104e7..9d63bc2 100644 (file)
@@ -63,7 +63,11 @@ function _getLogoutReasonString($code)
         return _("Your login has expired.");
 
     case Horde_Auth::REASON_MESSAGE:
-        return Horde_Util::getFormData(Horde_Auth::REASON_MSG_PARAM);
+        $msg = Horde_Auth::getAuthError(true);
+        if (!$msg) {
+               Horde_Util::getFormData(Horde_Auth::REASON_MSG_PARAM);
+        }
+        return $msg;
 
     default:
         return '';