$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 |