diff --git a/rhodecode/apps/my_account/views/my_account.py b/rhodecode/apps/my_account/views/my_account.py --- a/rhodecode/apps/my_account/views/my_account.py +++ b/rhodecode/apps/my_account/views/my_account.py @@ -230,7 +230,10 @@ class MyAccountView(BaseAppView, DataGri user_instance.has_enabled_2fa = state user_instance.update_userdata(update_2fa=time.time()) Session().commit() - h.flash(_("Successfully saved 2FA settings"), category='success') + if state: + h.flash(_("2FA has been successfully enabled"), category='success') + else: + h.flash(_("2FA has been successfully disabled"), category='success') raise HTTPFound(self.request.route_path('my_account_configure_2fa')) @LoginRequired()