mirror of
https://github.com/Part-DB/Part-DB-server.git
synced 2025-06-21 09:35:49 +02:00
Fixed exception on user settings submission
This commit is contained in:
parent
801ed0fbaf
commit
225da163bb
1 changed files with 1 additions and 1 deletions
|
@ -325,7 +325,7 @@ class UserSettingsController extends AbstractController
|
||||||
'disabled' => $this->demo_mode || $user->isSamlUser(),
|
'disabled' => $this->demo_mode || $user->isSamlUser(),
|
||||||
]);
|
]);
|
||||||
$google_enabled = $user->isGoogleAuthenticatorEnabled();
|
$google_enabled = $user->isGoogleAuthenticatorEnabled();
|
||||||
if (!$google_enabled && !$form->isSubmitted()) {
|
if (!$google_enabled && !$google_form->isSubmitted()) {
|
||||||
$user->setGoogleAuthenticatorSecret($googleAuthenticator->generateSecret());
|
$user->setGoogleAuthenticatorSecret($googleAuthenticator->generateSecret());
|
||||||
$google_form->get('googleAuthenticatorSecret')->setData($user->getGoogleAuthenticatorSecret());
|
$google_form->get('googleAuthenticatorSecret')->setData($user->getGoogleAuthenticatorSecret());
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue