Added user property to enforce 2fa or not

This commit is contained in:
Frank Schubert
2024-02-09 18:09:02 +01:00
parent c8bd553505
commit fc260c996d
5 changed files with 57 additions and 3 deletions

View File

@@ -216,7 +216,7 @@ class mfRouter {
$user = new User();
$user->loadMe();
if($user->twofactor < 1 && $classname != "mfLoginController" && $classname != "UserProfileController" && $this->action != "logout" && $this->action != "Logout") {
if($user->twofactorrequired && $user->twofactor < 1 && $classname != "mfLoginController" && $classname != "UserProfileController" && $this->action != "logout" && $this->action != "Logout") {
// redirect to UserProfile
if(MFUSEFANCYURLS) {
header("Location: $baseurl/UserProfile");