You are here

protected function SocialAuthUserManager::redirectToUserForm in Social Auth 8

Checks if User should be redirected to User Form after creation.

Parameters

\Drupal\user\UserInterface $drupal_user: User object to get the id of user.

Return value

\Symfony\Component\HttpFoundation\RedirectResponse|false A redirect response to user form, if option is enabled. False otherwise

1 call to SocialAuthUserManager::redirectToUserForm()
SocialAuthUserManager::authenticateNewUser in src/SocialAuthUserManager.php
Authenticates and redirects new users in authentication process.

File

src/SocialAuthUserManager.php, line 482

Class

SocialAuthUserManager
Contains all logic that is related to Drupal user management.

Namespace

Drupal\social_auth

Code

protected function redirectToUserForm(UserInterface $drupal_user) {
  if ($this->configFactory
    ->get('social_auth.settings')
    ->get('redirect_user_form')) {
    return $this
      ->redirect('entity.user.edit_form', [
      'user' => $drupal_user
        ->id(),
    ]);
  }
  return FALSE;
}