diff options
author | Robert Speicher <rspeicher@gmail.com> | 2015-06-19 15:14:37 -0400 |
---|---|---|
committer | Robert Speicher <rspeicher@gmail.com> | 2015-06-19 15:14:37 -0400 |
commit | b6318297fc93ab26108c586af9d34c16fc783589 (patch) | |
tree | 6755fcf5565a83fa7612081f902087601b69849c /app/controllers/passwords_controller.rb | |
parent | 22dd2240a6ec80955b98667c727326135a2f7f53 (diff) | |
download | gitlab-ce-b6318297fc93ab26108c586af9d34c16fc783589.tar.gz |
Use User#two_factor_enabled instead of otp_required_for_loginrs-dev-issue-2415
Diffstat (limited to 'app/controllers/passwords_controller.rb')
-rw-r--r-- | app/controllers/passwords_controller.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/app/controllers/passwords_controller.rb b/app/controllers/passwords_controller.rb index 145f27b67dd..8450ba31021 100644 --- a/app/controllers/passwords_controller.rb +++ b/app/controllers/passwords_controller.rb @@ -24,7 +24,7 @@ class PasswordsController < Devise::PasswordsController super do |resource| # TODO (rspeicher): In Devise master (> 3.4.1), we can set # `Devise.sign_in_after_reset_password = false` and avoid this mess. - if resource.errors.empty? && resource.try(:otp_required_for_login?) + if resource.errors.empty? && resource.try(:two_factor_enabled?) resource.unlock_access! if unlockable?(resource) # Since we are not signing this user in, we use the :updated_not_active |