Feature: Force MFA Part 3 - Enforce MFA by redirecting users to their user_profile to setup MFA if Force MFA is checked, next up is to lock them there until 2FA is set

This commit is contained in:
johnnyq
2023-09-06 00:08:21 -04:00
parent 17c8a9ab0c
commit 747b7de143
2 changed files with 6 additions and 3 deletions

View File

@@ -99,6 +99,10 @@ if (isset($_POST['login'])) {
$user_id = intval($row['user_id']);
$user_email = sanitizeInput($row['user_email']);
$token = sanitizeInput($row['user_token']);
$force_mfa = intval($row['user_config_force_mfa']);
if($force_mfa == 1 && $token == NULL) {
$config_start_page = "user_profile.php";
}
// Checking for user 2FA
if (empty($token) || TokenAuth6238::verify($token, $current_code)) {