/**
* Constructor.
*
* @param array $params A hash containing connection parameters.
*
* @throws Horde_Auth_Exception
*/
public function __construct($params = array())
{
$params = array_merge(array('adduser' => true, 'authId' => 'initials', 'encryption' => 'msad', 'newuser_objectclass' => 'user', 'password_expiration' => 'no', 'port' => 389, 'ssl' => false, 'uid' => array('samaccountname')), $params);
if (!is_array($params['uid'])) {
$params['uid'] = array($params['uid']);
}
/* Ensure we've been provided with all of the necessary parameters. */
//Horde::assertDriverConfig($params, 'auth',
// array('hostspec', 'basedn'), 'authentication MSAD');
/* Adjust capabilities: depending on if SSL encryption is
* enabled or not */
$this->_capabilities = array('add' => $params['ssl'] || $params['adduser'], 'list' => true, 'remove' => true, 'resetpassword' => $params['ssl'], 'update' => $params['ssl']);
parent::__construct($params);
}