Skip to content

Kirby 5.2.0

$auth->login2fa()

Login a user by email, password and auth challenge

$auth->login2fa(string $email, string $password, bool $long = false): Kirby\Cms\Auth\Status

Parameters

Name Type Default
$emailrequired string no default value
$passwordrequired string no default value
$long bool false

Return type

Kirby\Cms\Auth\Status

This method modifies the existing $auth object it is applied to and returns it again.

Exceptions

Type Description
Kirby\Exception\PermissionException If the rate limit was exceeded or if any other error occurred 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