You are here

public function SimpleLdapServer::getPageSize in Simple LDAP 8

If the LDAP server supports paged queries, set the pagesize for future queries.

Return value

mixed Integer if a pagesize exists and it is supported, FALSE if otherwise.

File

src/SimpleLdapServer.php, line 196

Class

SimpleLdapServer

Namespace

Drupal\simple_ldap

Code

public function getPageSize() {
  $this
    ->setPageSize();
  if ($this->ldap
    ->isBound() && $this->pagesize) {
    $this
      ->setRootDse();

    // Look for the paged query OID supported control.
    if (!in_array('1.2.840.113556.1.4.319', $this->rootdse['supportedcontrol'])) {
      $this->pagesize = FALSE;
    }
  }
  return $this->pagesize;
}