mirror of
https://github.com/discourse/discourse.git
synced 2024-11-27 00:53:39 +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
|
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
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user