You are here

public function SimpleLdapUserAuthenticator::authenticate in Simple LDAP 8

Attempt to authenticate against the LDAP server.

Parameters

$dn: DN (Distinguished Name) of the user.

$password:

Return value

boolean TRUE on success, FALSE on failure.

File

modules/simple_ldap_user/src/SimpleLdapUserAuthenticator.php, line 39

Class

SimpleLdapUserAuthenticator

Namespace

Drupal\simple_ldap_user

Code

public function authenticate($dn, $password) {
  return $this->server
    ->bind($dn, $password, TRUE);
}