mirror of
https://github.com/Part-DB/Part-DB-server.git
synced 2025-06-21 09:35:49 +02:00
Immediately show the new status after the google 2fa was enabled/disabled sucessfully.
This commit is contained in:
parent
8add8c919d
commit
44fe58c587
1 changed files with 2 additions and 0 deletions
|
@ -254,11 +254,13 @@ class UserController extends AdminPages\BaseAdminController
|
||||||
$user->setGoogleAuthenticatorSecret($google_form->get('googleAuthenticatorSecret')->getData());
|
$user->setGoogleAuthenticatorSecret($google_form->get('googleAuthenticatorSecret')->getData());
|
||||||
$em->flush();
|
$em->flush();
|
||||||
$this->addFlash('success', 'user.settings.2fa.google.activated');
|
$this->addFlash('success', 'user.settings.2fa.google.activated');
|
||||||
|
return $this->redirectToRoute('user_settings');
|
||||||
} elseif ($google_enabled) {
|
} elseif ($google_enabled) {
|
||||||
//Remove secret to disable google authenticator
|
//Remove secret to disable google authenticator
|
||||||
$user->setGoogleAuthenticatorSecret(null);
|
$user->setGoogleAuthenticatorSecret(null);
|
||||||
$em->flush();
|
$em->flush();
|
||||||
$this->addFlash('success', 'user.settings.2fa.google.disabled');
|
$this->addFlash('success', 'user.settings.2fa.google.disabled');
|
||||||
|
return $this->redirectToRoute('user_settings');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue