From 780fbabc12f69635f87e6fbd9f59c3928e39a9aa Mon Sep 17 00:00:00 2001 From: Jan Schneider Date: Tue, 21 Dec 2010 22:41:49 +0100 Subject: [PATCH] Fix incompatible method signatures. --- framework/Core/lib/Horde/Core/Auth/Application.php | 9 ++++++--- framework/Core/lib/Horde/Core/Auth/Msad.php | 10 ++++++---- framework/Core/lib/Horde/Core/Auth/Signup/Null.php | 2 +- 3 files changed, 13 insertions(+), 8 deletions(-) diff --git a/framework/Core/lib/Horde/Core/Auth/Application.php b/framework/Core/lib/Horde/Core/Auth/Application.php index c8f5b9703..ca1ada1e6 100644 --- a/framework/Core/lib/Horde/Core/Auth/Application.php +++ b/framework/Core/lib/Horde/Core/Auth/Application.php @@ -104,10 +104,13 @@ class Horde_Core_Auth_Application extends Horde_Auth_Base * * @param string $userId The user ID to check. * @param array $credentials The credentials to check. + * @param boolean $login Whether to log the user in. If false, we'll + * only test the credentials and won't modify + * the current session. Defaults to true. * * @return boolean Whether or not the credentials are valid. */ - public function authenticate($userId, $credentials) + public function authenticate($userId, $credentials, $login = true) { try { list($userId, $credentials) = $this->runHook(trim($userId), $credentials, 'preauthenticate', 'authenticate'); @@ -116,10 +119,10 @@ class Horde_Core_Auth_Application extends Horde_Auth_Base } if ($this->_base) { - if (!$this->_base->authenticate($userId, $credentials)) { + if (!$this->_base->authenticate($userId, $credentials, $login)) { return false; } - } elseif (!parent::authenticate($userId, $credentials)) { + } elseif (!parent::authenticate($userId, $credentials, $login)) { return false; } diff --git a/framework/Core/lib/Horde/Core/Auth/Msad.php b/framework/Core/lib/Horde/Core/Auth/Msad.php index d5c1cb395..d8e3a0eb3 100644 --- a/framework/Core/lib/Horde/Core/Auth/Msad.php +++ b/framework/Core/lib/Horde/Core/Auth/Msad.php @@ -39,25 +39,27 @@ class Horde_Core_Auth_Msad extends Horde_Auth_Msad * * @throws Horde_Auth_Exception */ - public function updateUser($oldID, $newID, $credentials) + public function updateUser($oldID, $newID, $credentials, $olddn = null, + $newdn = null) { list($oldId, $credentials) = $GLOBALS['injector']->getInstance('Horde_Core_Factory_Auth')->create()->runHook($oldId, $credentials, 'preauthenticate', 'admin'); - parent::updateUser($oldID, $newID, $credentials); + parent::updateUser($oldID, $newID, $credentials, $olddn, $newdn); } /** * Delete a set of authentication credentials. * * @param string $userId The user ID to delete. + * @param string $dn TODO * * @throws Horde_Auth_Exception */ - public function removeUser($userId) + public function removeUser($userId, $dn = null) { list($userId, $credentials) = $GLOBALS['injector']->getInstance('Horde_Core_Factory_Auth')->create()->runHook($userId, array(), 'preauthenticate', 'admin'); - parent::removeUser($userId, isset($credentials['ldap']) ? $credentials['ldap']['dn'] : null); + parent::removeUser($userId, isset($credentials['ldap']) ? $credentials['ldap']['dn'] : $dn); } } diff --git a/framework/Core/lib/Horde/Core/Auth/Signup/Null.php b/framework/Core/lib/Horde/Core/Auth/Signup/Null.php index a6ee77824..b2bfcb365 100644 --- a/framework/Core/lib/Horde/Core/Auth/Signup/Null.php +++ b/framework/Core/lib/Horde/Core/Auth/Signup/Null.php @@ -20,7 +20,7 @@ class Horde_Core_Auth_Signup_Null extends Horde_Core_Auth_Signup_Base * @param mixed $info Reference to array of parameters to be passed * to hook. */ - protected function _queueSignup(&$info) + protected function _queueSignup($info) { } -- 2.11.0