Skip to content

Commit

Permalink
We should override the Horde_Auth_Base::authenticate method here.
Browse files Browse the repository at this point in the history
  • Loading branch information
mrubinsk committed Mar 2, 2014
1 parent d7c40df commit 8f25d64
Showing 1 changed file with 17 additions and 6 deletions.
23 changes: 17 additions & 6 deletions framework/Core/lib/Horde/Core/ActiveSync/Auth.php
Expand Up @@ -47,18 +47,29 @@ public function __construct(array $params = array())
}

/**
* Find out if a set of login credentials are valid.
* Find out if a set of login credentials are valid, and if requested,
* mark the user as logged in in the current session.
*
* @param string $userId The userId to check.
* @param array $credentials The credentials to use.
* @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.
*
* @throws Horde_Auth_Exception
* @return boolean Whether or not the credentials are valid.
*/
protected function _authenticate($userId, $credentials)
public function authenticate($userId, $credentials, $login = true)
{
if (!$this->_params['base_driver']->authenticate($userId, $credentials)) {
throw new Horde_Auth_Exception($this->_params['base_driver']->getError(true), $this->_params['base_driver']->getError());
if (!$this->_params['base_driver']->authenticate($userId, $credentials, $login)) {
return false;
}

return true;
}

public function _authenticate($userId, $credentials)
{
// noop
}

/**
Expand Down

0 comments on commit 8f25d64

Please sign in to comment.