function tfa_basic_tfa_required in TFA Basic plugins 7
Whether TFA is required for the account.
Parameters
object $account:
Return value
bool
2 calls to tfa_basic_tfa_required()
- tfa_basic_disable_form in ./
tfa_basic.pages.inc - tfa_basic_tfa_ready_require in ./
tfa_basic.module - Implements hook_tfa_ready_require().
File
- ./
tfa_basic.module, line 294
Code
function tfa_basic_tfa_required($account) {
$required = FALSE;
$required_roles = variable_get('tfa_basic_roles_require', array());
if (!empty($required_roles)) {
foreach ($required_roles as $rid => $enabled) {
if ($enabled && array_key_exists($rid, $account->roles)) {
$required = TRUE;
break;
}
}
}
return $required;
}