You are here

protected function LdapBaseManager::checkAvailability in Lightweight Directory Access Protocol (LDAP) 8.4

Check availability of service.

We have to explicitly check this in many calls since the Server might not have been set yet.

24 calls to LdapBaseManager::checkAvailability()
LdapBaseManager::checkDnExists in ldap_servers/src/LdapBaseManager.php
Does dn exist for this server?
LdapBaseManager::checkDnExistsIncludeData in ldap_servers/src/LdapBaseManager.php
Does dn exist for this server and what is its data?
LdapBaseManager::createLdapEntry in ldap_servers/src/LdapBaseManager.php
Create LDAP entry.
LdapBaseManager::deleteLdapEntry in ldap_servers/src/LdapBaseManager.php
Perform an LDAP delete.
LdapBaseManager::modifyLdapEntry in ldap_servers/src/LdapBaseManager.php
Modify attributes of LDAP entry.

... See full list

File

ldap_servers/src/LdapBaseManager.php, line 127

Class

LdapBaseManager
LDAP Base Manager.

Namespace

Drupal\ldap_servers

Code

protected function checkAvailability() : bool {
  if ($this->server && $this->ldapBridge
    ->bind()) {
    return TRUE;
  }
  $this->logger
    ->error("LDAP server unavailable");
  return FALSE;
}