Private
Public Access
1
0

chg: pkg: upgrade the doctrine related back-end pkgs to the latest available version #7

This commit is contained in:
2026-04-20 09:05:36 +02:00
parent 5f856e4d70
commit 175581cdd5
30 changed files with 456 additions and 1015 deletions

View File

@@ -156,16 +156,16 @@ class TwoFactorController extends AbstractController
$code = $request->request->getString('_auth_code');
// Temporarily set the pending secret to verify the code
$user->setTotpSecret($pendingSecret);
$user->totpSecret = $pendingSecret;
if (!$this->totpAuthenticator->checkCode($user, $code)) {
$user->setTotpSecret(null);
$user->totpSecret = null;
$this->addFlash('error', 'Invalid verification code. Please try again.');
return $this->redirectToRoute('MineSeekerBundle_2fa_setup');
}
$backupCodes = $this->generateBackupCodes();
$user->setBackupCodes($backupCodes);
$user->backupCodes = $backupCodes;
$this->em->flush();
$request->getSession()->remove('totp_pending_secret');
@@ -187,8 +187,8 @@ class TwoFactorController extends AbstractController
/** @var User $user */
$user = $this->getUser();
$user->setTotpSecret(null);
$user->setBackupCodes([]);
$user->totpSecret = null;
$user->backupCodes = [];
$this->em->flush();
$this->addFlash('success', 'Two-factor authentication has been disabled.');
@@ -217,7 +217,7 @@ class TwoFactorController extends AbstractController
}
$backupCodes = $this->generateBackupCodes();
$user->setBackupCodes($backupCodes);
$user->backupCodes = $backupCodes;
$this->em->flush();
$this->addFlash('2fa_backup_codes', $backupCodes);