You are here

protected function SimpleLdapServer::setRootDse in Simple LDAP 8

Loads the server's rootDSE.

@throw SimpleLdapException

3 calls to SimpleLdapServer::setRootDse()
SimpleLdapServer::getPageSize in src/SimpleLdapServer.php
If the LDAP server supports paged queries, set the pagesize for future queries.
SimpleLdapServer::getServerType in src/SimpleLdapServer.php
Attempts to detect the directory type using the rootDSE.
SimpleLdapServer::getSubschemaSubentry in src/SimpleLdapServer.php
Returns the SubschemaSubentry for the server.

File

src/SimpleLdapServer.php, line 249

Class

SimpleLdapServer

Namespace

Drupal\simple_ldap

Code

protected function setRootDse() {
  if (!is_array($this->rootdse)) {
    $attributes = array(
      'vendorName',
      'vendorVersion',
      'namingContexts',
      'altServer',
      'supportedExtension',
      'supportedControl',
      'supportedSASLMechanisms',
      'supportedLDAPVersion',
      'subschemaSubentry',
      'objectClass',
      'rootDomainNamingContext',
    );
    $result = $this
      ->search('', 'objectclass=*', 'base', $attributes);
    $this->rootdse = $result[''];
  }
}