Adapted to new LoginAdapter interface
This commit is contained in:
parent
9727c8efce
commit
767943223d
@ -63,25 +63,22 @@ class LdapAdapter implements LoginAdapter
|
||||
protected $adapter;
|
||||
|
||||
/**
|
||||
* Create an adapter from the configuration
|
||||
*
|
||||
* @param array $configuration
|
||||
* @return oat\authLdap\model\LdapAdapter
|
||||
* Instantiates Zend Ldap adapter
|
||||
*/
|
||||
public static function createFromConfig(array $configuration) {
|
||||
return new self($configuration);
|
||||
public function __construct() {
|
||||
$this->adapter = new Ldap();
|
||||
}
|
||||
|
||||
/**
|
||||
* @param array $configuration
|
||||
* (non-PHPdoc)
|
||||
* @see \oat\oatbox\user\auth\LoginAdapter::setOptions()
|
||||
*/
|
||||
public function __construct(array $configuration) {
|
||||
$this->configuration = $configuration;
|
||||
|
||||
$this->adapter = new Ldap();
|
||||
$this->adapter->setOptions($configuration['config']);
|
||||
$this->setMapping($configuration['mapping']);
|
||||
|
||||
public function setOptions(array $options) {
|
||||
$this->configuration = $options;
|
||||
$this->adapter->setOptions($options['config']);
|
||||
if (isset($options['mapping'])) {
|
||||
$this->setMapping($options['mapping']);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
Loading…
Reference in New Issue
Block a user