Skip to content

Kirby 4.2.0

$user->is()

Compares the current object with the given user object

$user->is(?Kirby\Cms\User $user = null): bool

Parameters

Name Type Default
$user Kirby\Cms\User|null null

Return type

bool

Parent class

Kirby\Cms\User

Example

<?php if($kirby->user()->is($kirby->user('bastian@example.com'))): ?>
Put some message here.
<?php endif ?>