protected function LoginValidatorBase::verifyAccountCreation in Lightweight Directory Access Protocol (LDAP) 8.4
Verifies whether the user is available or can be created.
Return value
bool Whether to allow user login and creation.
1 call to LoginValidatorBase::verifyAccountCreation()
- LoginValidatorBase::validateCommonLoginConstraints in ldap_authentication/
src/ Controller/ LoginValidatorBase.php - Validate common login constraints for user.
File
- ldap_authentication/
src/ Controller/ LoginValidatorBase.php, line 349
Class
- LoginValidatorBase
- Handles the actual testing of credentials and authentication of users.
Namespace
Drupal\ldap_authentication\ControllerCode
protected function verifyAccountCreation() : bool {
if ($this->configFactory
->get('ldap_user.settings')
->get('acctCreation') === self::ACCOUNT_CREATION_LDAP_BEHAVIOUR || $this->configFactory
->get('user.settings')
->get('register') === UserInterface::REGISTER_VISITORS) {
$this->detailLog
->log('%username: Existing Drupal user account not found. Continuing on to attempt LDAP authentication', [
'%username' => $this->authName,
], 'ldap_authentication');
return TRUE;
}
$this->detailLog
->log('%username: Drupal user account not found and configuration is set to not create new accounts.', [
'%username' => $this->authName,
], 'ldap_authentication');
return FALSE;
}