diff options
Diffstat (limited to 'app')
-rw-r--r-- | app/controllers/profiles/two_factor_auths_controller.rb | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/app/controllers/profiles/two_factor_auths_controller.rb b/app/controllers/profiles/two_factor_auths_controller.rb index 60f8ec5cf30..30ee6891733 100644 --- a/app/controllers/profiles/two_factor_auths_controller.rb +++ b/app/controllers/profiles/two_factor_auths_controller.rb @@ -28,8 +28,13 @@ class Profiles::TwoFactorAuthsController < Profiles::ApplicationController end def destroy - current_user.otp_required_for_login = false - current_user.save! + current_user.update_attributes({ + otp_required_for_login: false, + encrypted_otp_secret: nil, + encrypted_otp_secret_iv: nil, + encrypted_otp_secret_salt: nil, + otp_backup_codes: nil + }) redirect_to profile_account_path end |