Fix incompatible method signatures.
authorJan Schneider <jan@horde.org>
Tue, 21 Dec 2010 21:41:49 +0000 (22:41 +0100)
committerJan Schneider <jan@horde.org>
Tue, 21 Dec 2010 21:43:37 +0000 (22:43 +0100)
framework/Core/lib/Horde/Core/Auth/Application.php
framework/Core/lib/Horde/Core/Auth/Msad.php
framework/Core/lib/Horde/Core/Auth/Signup/Null.php

index c8f5b97..ca1ada1 100644 (file)
@@ -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;
         }
 
index d5c1cb3..d8e3a0e 100644 (file)
@@ -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);
     }
 
 }
index a6ee778..b2bfcb3 100644 (file)
@@ -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)
     {
     }