mirror of
https://github.com/Icinga/icingaweb2.git
synced 2026-06-12 01:50:29 -04:00
Simplify if condition
This commit is contained in:
parent
3cc2bdc229
commit
69e4e43baf
1 changed files with 4 additions and 2 deletions
|
|
@ -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();
|
||||
|
|
|
|||
Loading…
Reference in a new issue