You are here

public function TfaBasePlugin::__construct in Two-factor Authentication (TFA) 7.2

Plugin constructor.

Parameters

array $context: Context of current TFA process. Must include key:

  • 'uid' Account uid of user in TFA process.

May include keys:

  • 'validate_context' Plugin-specific context for use during Tfa validation.
  • 'setup_context' Plugin-specific context for use during TfaSetup.
3 calls to TfaBasePlugin::__construct()
TfaTestFallback::__construct in tests/includes/tfa_test.fallback.inc
Constructor.
TfaTestLogin::__construct in tests/includes/tfa_test.login.inc
Constructor.
TfaTestSend::__construct in tests/includes/tfa_test.send.inc
Constructor.
3 methods override TfaBasePlugin::__construct()
TfaTestFallback::__construct in tests/includes/tfa_test.fallback.inc
Constructor.
TfaTestLogin::__construct in tests/includes/tfa_test.login.inc
Constructor.
TfaTestSend::__construct in tests/includes/tfa_test.send.inc
Constructor.

File

./tfa.inc, line 486
TFA module classes.

Class

TfaBasePlugin
Base plugin class.

Code

public function __construct(array $context = array()) {
  $this->context = $context;

  // Default code length is 6.
  $this->codeLength = 6;
  $this->isValid = FALSE;
}