From 229707231d4571c6c3ad80e2696c24c0b4b81f0c Mon Sep 17 00:00:00 2001 From: Michael Gauthier Date: Mon, 6 Feb 2023 17:39:40 -0400 Subject: [PATCH] Fix AdminUser::isAuthenticated logic to work properly when app 2fa is disabled --- Admin/dataobjects/AdminUser.php | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/Admin/dataobjects/AdminUser.php b/Admin/dataobjects/AdminUser.php index b5dbd446..39328acb 100644 --- a/Admin/dataobjects/AdminUser.php +++ b/Admin/dataobjects/AdminUser.php @@ -214,10 +214,9 @@ public function isAuthenticated(AdminApplication $app) $this->isActive() && !$this->force_change_password && ( - $app->is2FaEnabled() && ( - !$this->two_fa_enabled || - $this->two_fa_authenticated - ) + !$app->is2FaEnabled() || + !$this->two_fa_enabled || + $this->two_fa_authenticated ) );