You are here

public function UserAuthenticator::dispatchBeforeRedirect in Social Auth 8.2

Same name and namespace in other branches
  1. 3.x src/User/UserAuthenticator.php \Drupal\social_auth\User\UserAuthenticator::dispatchBeforeRedirect()

Dispatch an event before user is redirected to the provider.

Parameters

string|null $destination: The destination url.

File

src/User/UserAuthenticator.php, line 438

Class

UserAuthenticator
Manages Drupal authentication tasks for Social Auth.

Namespace

Drupal\social_auth\User

Code

public function dispatchBeforeRedirect($destination = NULL) {
  $event = new BeforeRedirectEvent($this->dataHandler, $this
    ->getPluginId(), $destination);
  $this->eventDispatcher
    ->dispatch(SocialAuthEvents::BEFORE_REDIRECT, $event);
}