mirror of
https://github.com/discourse/discourse.git
synced 2024-11-23 01:33:24 +08:00
FIX: use safe navigation operator when checking for totp_enabled
This commit is contained in:
parent
fe8301007c
commit
185d6ac747
|
@ -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
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user