Fix #4571: Show banner when email verification is required.
* Show a banner if the user is restricted because they signed up from a proxy or VPN. * Add an option to resend the confirmation email if your account has an unverified email address.
This commit is contained in:
@@ -9,6 +9,15 @@ class EmailAddressPolicy < ApplicationPolicy
|
||||
end
|
||||
|
||||
def verify?
|
||||
record.valid_key?(request.params[:email_verification_key])
|
||||
if request.params[:email_verification_key].present?
|
||||
record.valid_key?(request.params[:email_verification_key])
|
||||
else
|
||||
record.user_id == user.id
|
||||
end
|
||||
end
|
||||
|
||||
def send_confirmation?
|
||||
# XXX record is a user, not the email address.
|
||||
record.id == user.id
|
||||
end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user