diff options
author | Robert Speicher <rspeicher@gmail.com> | 2015-06-19 22:14:37 +0300 |
---|---|---|
committer | Robert Speicher <rspeicher@gmail.com> | 2015-06-19 22:14:37 +0300 |
commit | b6318297fc93ab26108c586af9d34c16fc783589 (patch) | |
tree | 6755fcf5565a83fa7612081f902087601b69849c /app/controllers/profiles/two_factor_auths_controller.rb | |
parent | 22dd2240a6ec80955b98667c727326135a2f7f53 (diff) |
Use User#two_factor_enabled instead of otp_required_for_login
Diffstat (limited to 'app/controllers/profiles/two_factor_auths_controller.rb')
-rw-r--r-- | app/controllers/profiles/two_factor_auths_controller.rb | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/app/controllers/profiles/two_factor_auths_controller.rb b/app/controllers/profiles/two_factor_auths_controller.rb index e7579c652fb..03845f1e1ec 100644 --- a/app/controllers/profiles/two_factor_auths_controller.rb +++ b/app/controllers/profiles/two_factor_auths_controller.rb @@ -10,7 +10,7 @@ class Profiles::TwoFactorAuthsController < Profiles::ApplicationController def create if current_user.valid_otp?(params[:pin_code]) - current_user.otp_required_for_login = true + current_user.two_factor_enabled = true @codes = current_user.generate_otp_backup_codes! current_user.save! @@ -30,7 +30,7 @@ class Profiles::TwoFactorAuthsController < Profiles::ApplicationController def destroy current_user.update_attributes({ - otp_required_for_login: false, + two_factor_enabled: false, encrypted_otp_secret: nil, encrypted_otp_secret_iv: nil, encrypted_otp_secret_salt: nil, |