Skip to content

Kirby 6.0.0

$sessions->find()

Returns the session for the given token

$sessions->find(string $token, string|null $mode = null): Session

Parameters

Name Type Default Description
$tokenrequired string no default value Session token, either including or without the key
$mode stringornull null Optional transmission mode override

Return type

Kirby\Session\Session

Exceptions

Type Description
Kirby\Exception\InvalidArgumentException If the token is malformed
Kirby\Exception\NotFoundException If no matching session exists
Kirby\Exception\LogicException If the session data is invalid or expired

Parent class

Kirby\Session\Sessions