Skip to content

Kirby 4.4.1

$user->username()

Returns the username which is the given name or the email as a fallback

$user->username(): string|null

Return type

string|null

Parent class

Kirby\Cms\User

Example

<?= $kirby->user('bastian@example.com')->username() ?>