From 69e4e43baf04c2e4656114e02b77ebacfdf62da2 Mon Sep 17 00:00:00 2001 From: Johannes Rauh Date: Thu, 2 Oct 2025 08:27:46 +0200 Subject: [PATCH] Simplify if condition --- application/controllers/AuthenticationController.php | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/application/controllers/AuthenticationController.php b/application/controllers/AuthenticationController.php index 1c57e0dd4..84cc5b37a 100644 --- a/application/controllers/AuthenticationController.php +++ b/application/controllers/AuthenticationController.php @@ -54,8 +54,10 @@ class AuthenticationController extends Controller } $user = $this->Auth()->getUser(); - if ($user !== null && $user->getTwoFactorEnabled() - && Session::getSession()->get('2fa_must_challenge_token', false) === true) { + if ($user + && $user->getTwoFactorEnabled() + && Session::getSession()->get('2fa_must_challenge_token', false) + ) { $form = new Challenge2FAForm(); $cancel2faForm = new Cancel2FAForm(); $cancel2faForm->handleRequest();