private function LoginValidator::initializeDrupalUserFromAuthName in Lightweight Directory Access Protocol (LDAP) 8.3
Determine if the corresponding Drupal account exists and is mapped.
The authName property is checked against external authentication mapping.
1 call to LoginValidator::initializeDrupalUserFromAuthName()
- LoginValidator::validateCommonLoginConstraints in ldap_authentication/
src/ Controller/ LoginValidator.php - Validate common login constraints for user.
File
- ldap_authentication/
src/ Controller/ LoginValidator.php, line 231
Class
- LoginValidator
- Handles the actual testing of credentials and authentication of users.
Namespace
Drupal\ldap_authentication\ControllerCode
private function initializeDrupalUserFromAuthName() {
$this->drupalUser = user_load_by_name($this->authName);
if (!$this->drupalUser) {
$uid = ExternalAuthenticationHelper::getUidFromIdentifierMap($this->authName);
if ($uid) {
$this->drupalUser = $this->entityTypeManager
->getStorage('user')
->load($uid);
}
}
if ($this->drupalUser) {
$this->drupalUserAuthMapped = ExternalAuthenticationHelper::getUserIdentifierFromMap($this->drupalUser
->id());
}
}