function user_format_name
user_format_name(AccountInterface $account)
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(); }
© 2001–2016 by the original authors
Licensed under the GNU General Public License, version 2 and later.
Drupal is a registered trademark of Dries Buytaert.
https://api.drupal.org/api/drupal/core!modules!user!user.module/function/user_format_name/8.1.x