if (Horde_Auth::getCredential('password') == $info['old']) {
Horde_Auth::setCredential('password', $info['new']);
$secret = $injector->getInstance('Horde_Secret');
- if (Horde_Auth::getProvider() == 'imp' ||
+ if ($registry->getProvider() == 'imp' ||
!empty($_SESSION['imp']['pass'])) {
$_SESSION['imp']['pass'] = $secret->write($secret->getKey('imp'), $info['new']);
}
}
/**
- * Returns the name of the authentication provider.
- *
- * @return string The name of the driver currently providing
- * authentication, or false if not set.
- */
- static public function getProvider()
- {
- return empty($_SESSION['horde_auth']['driver'])
- ? false
- : $_SESSION['horde_auth']['driver'];
- }
-
- /**
* Sets the error message for an invalid authentication.
*
* @param string $type The type of error (self::REASON_* constant).
}
/**
+ * Returns the name of the authentication provider.
+ *
+ * @return string The name of the driver currently providing
+ * authentication, or false if not set.
+ */
+ public function getProvider()
+ {
+ return empty($_SESSION['horde_auth']['driver'])
+ ? false
+ : $_SESSION['horde_auth']['driver'];
+ }
+
+ /**
* Clears any authentication tokens in the current session.
*
* @param boolean $destroy Destroy the session?
$credentials = array('password' => $secret->read($secret->getKey('gollem'), $GLOBALS['gollem_be']['params']['password']));
}
- $login = ($login && (Horde_Auth::getProvider() == 'gollem'));
+ $login = ($login && ($GLOBALS['registry']->getProvider() == 'gollem'));
return parent::authenticate($userID, $credentials, $login);
}
}
/**
- * Change the Horde/IMP/MIMP cached credentials. Should be called
+ * Change the Horde/IMP cached credentials. Should be called
* only after a successful change of the password in the actual
* backend storage. This routine is the same for all backends and
* should not be implemented in the backend classes.
{
if (Auth::getCredential('password') == $old_password) {
Auth::setCredential('password', $new_password);
- if (Auth::getProvider() == 'imp') {
+ if ($GLOBALS['registry']->getProvider() == 'imp') {
$_SESSION['imp']['pass'] = Secret::write(Secret::getKey('imp'),
$new_password);
- } elseif (Auth::getProvider() == 'mimp') {
- $_SESSION['mimp']['pass'] = Secret::write(Secret::getKey('mimp'),
- $new_password);
}
}
}