public function User::getDisplayName in Drupal 10
Same name and namespace in other branches
- 8 core/modules/user/src/Entity/User.php \Drupal\user\Entity\User::getDisplayName()
- 9 core/modules/user/src/Entity/User.php \Drupal\user\Entity\User::getDisplayName()
File
- core/
modules/ user/ src/ Entity/ User.php, line 382
Class
- User
- Defines the user entity class.
Namespace
Drupal\user\EntityCode
public function getDisplayName() {
$name = $this
->getAccountName() ?: \Drupal::config('user.settings')
->get('anonymous');
\Drupal::moduleHandler()
->alter('user_format_name', $name, $this);
return $name;
}