public static function MoAuthUtilities::mo_auth_is_kba_configured in Google Authenticator / 2 Factor Authentication - 2FA 8
Same name and namespace in other branches
- 8.2 src/MoAuthUtilities.php \Drupal\miniorange_2fa\MoAuthUtilities::mo_auth_is_kba_configured()
1 call to MoAuthUtilities::mo_auth_is_kba_configured()
File
- src/
MoAuthUtilities.php, line 363 - This file is part of miniOrange 2FA module.
Class
Namespace
Drupal\miniorange_2faCode
public static function mo_auth_is_kba_configured($user_id) {
$utilities = new MoAuthUtilities();
$custom_attribute = $utilities
->get_users_custom_attribute($user_id);
$myArray = explode(',', $custom_attribute[0]->configured_auth_methods);
$configured_methods = array_map('trim', $myArray);
return array_search('KBA', $configured_methods);
}