You are here

public function SocialAuth::getUserId in Social Auth 8.2

Same name and namespace in other branches
  1. 3.x src/Entity/SocialAuth.php \Drupal\social_auth\Entity\SocialAuth::getUserId()

Returns the Drupal user id.

Return value

string The user id.

Overrides SocialApi::getUserId

File

src/Entity/SocialAuth.php, line 49

Class

SocialAuth
Defines the Social Auth entity.

Namespace

Drupal\social_auth\Entity

Code

public function getUserId() {
  return $this
    ->get('user_id')->target_id;
}