private function LdapEntryProvisionSubscriber::checkExistingLdapEntry in Lightweight Directory Access Protocol (LDAP) 8.4
Check existing LDAP entry.
Return value
bool|\Symfony\Component\Ldap\Entry|null Entry, false or null.
3 calls to LdapEntryProvisionSubscriber::checkExistingLdapEntry()
- LdapEntryProvisionSubscriber::login in ldap_user/
src/ EventSubscriber/ LdapEntryProvisionSubscriber.php - Handle account login with LDAP entry provisioning.
- LdapEntryProvisionSubscriber::userCreated in ldap_user/
src/ EventSubscriber/ LdapEntryProvisionSubscriber.php - Create or update LDAP entries on user creation.
- LdapEntryProvisionSubscriber::userUpdated in ldap_user/
src/ EventSubscriber/ LdapEntryProvisionSubscriber.php - Create or update LDAP entries on user update.
File
- ldap_user/
src/ EventSubscriber/ LdapEntryProvisionSubscriber.php, line 632
Class
- LdapEntryProvisionSubscriber
- Event subscribers for creating and updating LDAP entries.
Namespace
Drupal\ldap_user\EventSubscriberCode
private function checkExistingLdapEntry() {
// @todo Inject.
$authmap = \Drupal::service('externalauth.authmap')
->get($this->account
->id(), 'ldap_user');
if ($authmap) {
return $this->ldapUserManager
->queryAllBaseDnLdapForUsername($authmap);
}
return FALSE;
}