function moIsBackdoorUrlEnabled in Google Authenticator / 2 Factor Authentication - 2FA 7
1 call to moIsBackdoorUrlEnabled()
File
- ./
mo_auth.module, line 368 - Module file for miniOrange 2FA Module.
Code
function moIsBackdoorUrlEnabled($isUserAdmin) {
$backdoor_enabled = variable_get('miniorange_2fa_enable_backdoor', FALSE);
$query_parameters = drupal_get_query_parameters();
if (variable_get('mo_auth_two_factor_instead_password') == true) {
return true;
}
// returns true if backdoor condition is not satisfied
return !($backdoor_enabled && $isUserAdmin === TRUE && isset($query_parameters['login_2fa']) && $query_parameters['login_2fa'] == variable_get('miniorange_2fa_backdoor_url_query'));
}