Skip to content

$auth->login()

Login a user by email and password

$auth->login(string $email, string $password, bool $long = false): Kirby\Cms\User

Parameters

Name Type Default
$email * string
$password * string
$long bool false

Return type

Kirby\Cms\User

Exceptions

Type Description
Kirby\Exception\PermissionException If the rate limit was exceeded or if any other error occured with debug mode off
Kirby\Exception\NotFoundException If the email was invalid
Kirby\Exception\InvalidArgumentException If the password is not valid (via $user->login())

Parent class

Kirby\Cms\Auth