You are here

public function ExternalAuth::userLoginFinalize in External Authentication 8

Same name and namespace in other branches
  1. 2.0.x src/ExternalAuth.php \Drupal\externalauth\ExternalAuth::userLoginFinalize()

@codeCoverageIgnore

Overrides ExternalAuthInterface::userLoginFinalize

2 calls to ExternalAuth::userLoginFinalize()
ExternalAuth::login in src/ExternalAuth.php
Log a Drupal user in based on an external authname.
ExternalAuth::loginRegister in src/ExternalAuth.php
Login and optionally register a Drupal user based on an external authname.

File

src/ExternalAuth.php, line 162

Class

ExternalAuth
Class ExternalAuth.

Namespace

Drupal\externalauth

Code

public function userLoginFinalize(UserInterface $account, $authname, $provider) {
  user_login_finalize($account);
  $this->logger
    ->notice('External login of user %name', [
    '%name' => $account
      ->getAccountName(),
  ]);
  $this->eventDispatcher
    ->dispatch(ExternalAuthEvents::LOGIN, new ExternalAuthLoginEvent($account, $provider, $authname));
  return $account;
}