You are here

function realname_load in Real Name 8

Same name and namespace in other branches
  1. 7 realname.module \realname_load()
  2. 2.x realname.module \realname_load()

Loads a real name.

Parameters

Drupal\user\Entity\User $account: A user account object.

Return value

mixed The user's generated real name.

Related topics

File

./realname.module, line 161
Provides token-based name displays for users.

Code

function realname_load(User $account) {
  $realnames = realname_load_multiple([
    $account
      ->id() => $account,
  ]);
  return reset($realnames);
}