Skip to content

Kirby 3.7.5

Challenge::isAvailable()

Checks whether the challenge is available for the passed user and purpose

Challenge::isAvailable(Kirby\Cms\User $user, string $mode): bool

Parameters

Name Type Default Description
$user * Kirby\Cms\User User the code will be generated for
$mode * string Purpose of the code ('login', 'reset' or '2fa')

Return type

bool

Parent class

Kirby\Cms\Auth\Challenge