Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJames Lopez <james@jameslopez.es>2017-06-23 18:11:31 +0300
committerJames Lopez <james@jameslopez.es>2017-06-23 18:11:31 +0300
commitb33c638483d6b87ba71a329275ff12e5eb865d72 (patch)
treeaf7f0c3caac54bad865e651654772d575d9d0e4b /app/controllers/profiles
parent8f2adb8084c15026115aed39a06e9af04c5e7957 (diff)
update code based on feedback
Diffstat (limited to 'app/controllers/profiles')
-rw-r--r--app/controllers/profiles/two_factor_auths_controller.rb4
1 files changed, 3 insertions, 1 deletions
diff --git a/app/controllers/profiles/two_factor_auths_controller.rb b/app/controllers/profiles/two_factor_auths_controller.rb
index 1a4f77639e7..a864f86f3dd 100644
--- a/app/controllers/profiles/two_factor_auths_controller.rb
+++ b/app/controllers/profiles/two_factor_auths_controller.rb
@@ -41,8 +41,10 @@ class Profiles::TwoFactorAuthsController < Profiles::ApplicationController
def create
if current_user.validate_and_consume_otp!(params[:pin_code])
+ codes = nil
+
Users::UpdateService.new(current_user, otp_required_for_login: true).execute! do |user|
- @codes = user.generate_otp_backup_codes!
+ codes = user.generate_otp_backup_codes!
end
render 'create'