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
1 changed files with 1 additions and 1 deletions

View File

@ -592,7 +592,7 @@ class UsersController < ApplicationController
end
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]
confirm_email = false