You are here

public function SimpleLdap::ldapBind in Simple LDAP 8

Wrapper function for ldap_bind().

Parameters

string $bind_rdn: The RDN to bind with. If not specified, and anonymous bind is attempted.

string $bind_password: The password to use during the bind.

Return value

boolean Returns TRUE on success or FALSE on failure.

File

src/SimpleLdap.php, line 229

Class

SimpleLdap
A wrapper for PHP's LDAP functions, with associated helper methods.

Namespace

Drupal\simple_ldap

Code

public function ldapBind($bind_rdn = NULL, $bind_password = NULL) {
  $bound = @ldap_bind($this->connection
    ->getResource(), $bind_rdn, $bind_password);
  $this->bound = $bound;
  return $bound;
}