public function TfaContext::pluginAllowsLogin in Two-factor Authentication (TFA) 8
Whether at least one plugin allows authentication.
If any plugin returns TRUE then authentication is not interrupted by TFA.
Return value
bool TRUE if login allowed otherwise FALSE.
Overrides TfaContextInterface::pluginAllowsLogin
File
- src/
TfaContext.php, line 183  
Class
- TfaContext
 - Provide context for the current login attempt.
 
Namespace
Drupal\tfaCode
public function pluginAllowsLogin() {
  if (!empty($this->tfaLoginPlugins)) {
    foreach ($this->tfaLoginPlugins as $plugin) {
      if ($plugin
        ->loginAllowed()) {
        return TRUE;
      }
    }
  }
  return FALSE;
}