__construct() public method

Constructor.
public __construct ( array $params = [] )
$params array Required parameters:
'basedn' - (string) [REQUIRED] The base DN for the LDAP server.
'filter' - (string) The LDAP formatted search filter to search for
           users. This setting overrides the 'objectclass' parameter.
'ldap' - (Horde_Ldap) [REQUIRED] Horde LDAP object.
'objectclass - (string|array): The objectclass filter used to search
               for users. Either a single or an array of objectclasses.
'uid' - (string) [REQUIRED] The username search key.
Example #1
0
 /**
  * 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);
 }