Merge branch 'fronkdev' into 'master'
2FA can now be forced for logged-in users See merge request fronk/thetool!211
This commit is contained in:
@@ -211,21 +211,21 @@ class mfRouter {
|
||||
session_start();
|
||||
}
|
||||
|
||||
/*$user = new User();
|
||||
// check for enabled 2FA if authentication is enabled and 2FA is forced
|
||||
if(defined("MFUSELOGIN") && MFUSELOGIN && defined("TT_WORKER_FORCE_2FA") && TT_WORKER_FORCE_2FA && mfLoginController::isLoggedIn()) {
|
||||
$user = new User();
|
||||
$user->loadMe();
|
||||
|
||||
if($user->twofactor < 1 && $classname != "mfLoginController" && $classname != "UserProfileController" && $this->action != "logout" && $this->action != "Logout") {
|
||||
//$this->mod = "UserProfile";
|
||||
//$this->action = "Index";
|
||||
// redirect to UserProfile
|
||||
if(MFUSEFANCYURLS) {
|
||||
header("Location: $baseurl/UserProfile");
|
||||
exit;
|
||||
} else {
|
||||
header("Location: $baseurl?Mod=UserProfile");
|
||||
}
|
||||
exit;
|
||||
}
|
||||
}*/
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
$request['mod'] = ucfirst($this->mod);
|
||||
|
||||
Reference in New Issue
Block a user