FIX: use safe navigation operator when checking for totp_enabled

This commit is contained in:
Arpit Jalan 2018-04-09 12:33:41 +05:30
parent fe8301007c
commit 185d6ac747

View File

@ -592,7 +592,7 @@ class UsersController < ApplicationController
end end
email_token_user = EmailToken.confirmable(token)&.user email_token_user = EmailToken.confirmable(token)&.user
totp_enabled = email_token_user.totp_enabled? totp_enabled = email_token_user&.totp_enabled?
second_factor_token = params[:second_factor_token] second_factor_token = params[:second_factor_token]
confirm_email = false confirm_email = false