$auth->currentUserFromSession()
Returns the logged in user by checking the current session and finding a valid valid user id in there
$auth->currentUserFromSession(Kirby\Session\Session|array|null $session = null): Kirby\Cms\User|null
Parameters
| Name | Type | Default |
|---|---|---|
| $session | Kirby\Session\Sessionorarrayornull |
null
|
Return types
Kirby\Cms\Userornull
This method modifies the existing $auth object it is applied to and returns it again.