Skip to content

Kirby 6.0.0

$user->impersonate()

Impersonates a user

$user->impersonate(string|null $who = null): User|null

Parameters

Name Type Default
$who stringornull null

Return types

Kirby\Cms\Userornull

Exceptions

Type Description
Kirby\Exception\NotFoundException if the given user cannot be found

Parent class

Kirby\Auth\User