You are here

function realname_load in Real Name 2.x

Same name and namespace in other branches
  1. 8 realname.module \realname_load()
  2. 7 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);
}