You are here

public function TfaRecoveryCode::ready in Two-factor Authentication (TFA) 8

Determine if the plugin can run for the current TFA context.

Return value

bool True or False based on the checks performed.

Overrides TfaBasePlugin::ready

1 method overrides TfaRecoveryCode::ready()
TfaRecoveryCodeSetup::ready in src/Plugin/TfaSetup/TfaRecoveryCodeSetup.php
Determine if the plugin can run for the current TFA context.

File

src/Plugin/TfaValidation/TfaRecoveryCode.php, line 86

Class

TfaRecoveryCode
Recovery validation class for performing recovery codes validation.

Namespace

Drupal\tfa\Plugin\TfaValidation

Code

public function ready() {
  $codes = $this
    ->getCodes();
  return !empty($codes);
}