private function DrupalUserProcessor::provisionLdapEntryOnUserCreation in Lightweight Directory Access Protocol (LDAP) 8.3
Handle LDAP entry provision on user creation.
Parameters
\Drupal\user\UserInterface $account: The Drupal user account.
1 call to DrupalUserProcessor::provisionLdapEntryOnUserCreation()
- DrupalUserProcessor::newDrupalUserCreated in ldap_user/
src/ Processor/ DrupalUserProcessor.php - Callback for hook_ENTITY_TYPE_insert().
File
- ldap_user/
src/ Processor/ DrupalUserProcessor.php, line 1026
Class
- DrupalUserProcessor
- Handles processing of a user from LDAP to Drupal.
Namespace
Drupal\ldap_user\ProcessorCode
private function provisionLdapEntryOnUserCreation(UserInterface $account) {
if ($this
->provisionsLdapEntriesFromDrupalUsers()) {
$processor = new LdapUserProcessor();
if (LdapConfiguration::provisionAvailableToLdap(self::PROVISION_LDAP_ENTRY_ON_USER_ON_USER_UPDATE_CREATE)) {
if (!$processor
->getProvisionRelatedLdapEntry($account)) {
$provision_result = $processor
->provisionLdapEntry($account);
if ($provision_result['status'] == 'success') {
SemaphoreStorage::set('provision', $account
->getAccountName());
}
}
else {
if ($processor
->syncToLdapEntry($account)) {
SemaphoreStorage::set('sync', $account
->getAccountName());
}
}
}
}
}