public static function ExternalAuthenticationHelper::setUserIdentifier in Lightweight Directory Access Protocol (LDAP) 8.3
Replaces the authmap table retired in Drupal 8.
In Drupal 7 this was user_set_authmap.
Parameters
\Drupal\user\UserInterface $account: Drupal user account.
string $identifier: Authentication name.
4 calls to ExternalAuthenticationHelper::setUserIdentifier()
- DrupalUserProcessor::createDrupalUser in ldap_user/
src/ Processor/ DrupalUserProcessor.php - Create a Drupal user.
- DrupalUserProcessor::updateExistingAccountByPersistentUid in ldap_user/
src/ Processor/ DrupalUserProcessor.php - Update Drupal user from PUID.
- LoginValidator::matchExistingUserWithLdap in ldap_authentication/
src/ Controller/ LoginValidator.php - Match existing user with LDAP.
- LoginValidator::updateAuthNameFromPuid in ldap_authentication/
src/ Controller/ LoginValidator.php - Update the authName if it's no longer valid.
File
- ldap_user/
src/ Helper/ ExternalAuthenticationHelper.php, line 24
Class
- ExternalAuthenticationHelper
- Helper class to wrap external_auth service.
Namespace
Drupal\ldap_user\HelperCode
public static function setUserIdentifier(UserInterface $account, $identifier) {
$authmap = \Drupal::service('externalauth.authmap');
$authmap
->save($account, 'ldap_user', $identifier);
}