You are here

public function TokenAuthUser::getAccountName in Simple OAuth (OAuth2) & OpenID Connect 5.x

Same name and namespace in other branches
  1. 8.4 src/Authentication/TokenAuthUser.php \Drupal\simple_oauth\Authentication\TokenAuthUser::getAccountName()
  2. 8 src/Authentication/TokenAuthUser.php \Drupal\simple_oauth\Authentication\TokenAuthUser::getAccountName()
  3. 8.2 src/Authentication/TokenAuthUser.php \Drupal\simple_oauth\Authentication\TokenAuthUser::getAccountName()
  4. 8.3 src/Authentication/TokenAuthUser.php \Drupal\simple_oauth\Authentication\TokenAuthUser::getAccountName()

Returns the unaltered login name of this account.

Return value

string An unsanitized plain-text string with the name of this account that is used to log in. Only display this name to admins and to the user who owns this account, and only in the context of the name used to login. For any other display purposes, use \Drupal\Core\Session\AccountInterface::getDisplayName() instead.

Overrides AccountInterface::getAccountName

File

src/Authentication/TokenAuthUser.php, line 162

Class

TokenAuthUser
The decorated user class with token information.

Namespace

Drupal\simple_oauth\Authentication

Code

public function getAccountName() {
  return $this->subject
    ->getAccountName();
}