Find::user()
Returns the user object for the given id or returns the current authenticated user if no id is passed
Find::user(string|null $id = null): Kirby\Cms\User|null
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
| $id | stringornull |
null
|
User's id |
Return types
Kirby\Cms\Userornull
Exceptions
| Type | Description |
|---|---|
Kirby\Exception\NotFoundException |
if the user for the given id cannot be found |