Simplify if condition

This commit is contained in:
Johannes Rauh 2025-10-02 08:27:46 +02:00
parent 3cc2bdc229
commit 69e4e43baf

View file

@ -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();