private function Server::anonymousBind in Lightweight Directory Access Protocol (LDAP) 8.3
Bind to server anonymously.
Return value
int Returns the binding response code from LDAP.
1 call to Server::anonymousBind()
- Server::bind in ldap_servers/
src/ Entity/ Server.php - Bind (authenticate) against an active LDAP database.
File
- ldap_servers/
src/ Entity/ Server.php, line 264
Class
- Server
- Defines the Server entity.
Namespace
Drupal\ldap_servers\EntityCode
private function anonymousBind() {
if (@(!ldap_bind($this->connection))) {
$this->detailLog
->log("LDAP anonymous bind error. Error %error", [
'%error' => $this
->formattedError($this
->ldapErrorNumber()),
]);
$response = ldap_errno($this->connection);
}
else {
$response = self::LDAP_SUCCESS;
}
return $response;
}