Skip to content

Kirby 5.1.1

$user->is()

Compares the current object with the given user object

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

Parameters

Name Type Default
$user Kirby\Cms\Userornull null

Return type

bool

This method modifies the existing $user object it is applied to and returns it again.

Parent class

Kirby\Cms\User

Examples

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