Firefly III: a personal finances manager
PHP accountingbudgetbudgetingbudgetscash-flowcashflowcredit-carddockerexpensesfinancefinancesfinanciallinuxmoneypaycheckpersonal-financephpphp7
Can disable MFA
James Cole616d921bef71
diff --git a/app/Http/Controllers/ProfileController.php b/app/Http/Controllers/ProfileController.phpindex a82fe7065b..fcb89adbc0 100644--- a/app/Http/Controllers/ProfileController.php+++ b/app/Http/Controllers/ProfileController.php@@ -231,9 +231,13 @@ class ProfileController extends Controller*/public function deleteCode(){- die('this method is deprecated.');- app('preferences')->delete('twoFactorAuthEnabled');- app('preferences')->delete('twoFactorAuthSecret');+ /** @var UserRepositoryInterface $repository */+ $repository = app(UserRepositoryInterface::class);++ /** @var User $user */+ $user = auth()->user();++ $repository->setMFACode($user, null);session()->flash('success', (string)trans('firefly.pref_two_factor_auth_disabled'));session()->flash('info', (string)trans('firefly.pref_two_factor_auth_remove_it'));@@ -413,6 +417,9 @@ class ProfileController extends Controllersession()->flash('success', (string)trans('firefly.saved_preferences'));app('preferences')->mark();+ // make sure MFA is logged out.+ Google2FA::logout();+return redirect(route('profile.index'));}