Added user property to enforce 2fa or not
This commit is contained in:
@@ -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");
|
||||
|
||||
Reference in New Issue
Block a user