You are here

function user_format_name in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 core/modules/user/user.module \user_format_name()

Format a username.

@todo Remove usage in https://www.drupal.org/node/2311219.

Parameters

\Drupal\Core\Session\AccountInterface $account: The account object for the user whose name is to be formatted.

Return value

string An unsanitized string with the username to display.

Deprecated

in Drupal 8.0.x-dev, will be removed before Drupal 9.0.0. Use \Drupal\Core\Session\AccountInterface::getDisplayName().

File

core/modules/user/user.module, line 423
Enables the user registration and login system.

Code

function user_format_name(AccountInterface $account) {
  return $account
    ->getDisplayName();
}