You are here

public function UserAuthenticator::checkProviderIsAssociated in Social Auth 8.2

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

Checks if provider is already associated to the Drupal user.

Parameters

string $provider_user_id: User's id on provider.

Return value

int|false The Drupal user id if it exists. False otherwise.

File

src/User/UserAuthenticator.php, line 382

Class

UserAuthenticator
Manages Drupal authentication tasks for Social Auth.

Namespace

Drupal\social_auth\User

Code

public function checkProviderIsAssociated($provider_user_id) {
  return $this->userManager
    ->getDrupalUserId($provider_user_id);
}