mirror of
https://github.com/mastodon/mastodon.git
synced 2026-10-01 21:51:19 -05:00
Fix canonical email blocks interfering with freezing or approving users (#40463)
This commit is contained in:
@@ -90,7 +90,7 @@ class User < ApplicationRecord
|
||||
validates :email, presence: true, email_address: true, length: { maximum: 320 }
|
||||
validates :email, email_mx: { attempt_ip: :sign_up_ip }, if: :validate_email_dns?
|
||||
|
||||
validates_with UserEmailValidator, if: -> { ENV['EMAIL_DOMAIN_LISTS_APPLY_AFTER_CONFIRMATION'] == 'true' || !confirmed? }
|
||||
validates_with UserEmailValidator, if: -> { (ENV['EMAIL_DOMAIN_LISTS_APPLY_AFTER_CONFIRMATION'] == 'true' || !confirmed?) && will_save_change_to_email? }
|
||||
validates :agreement, acceptance: { allow_nil: false, accept: [true, 'true', '1'] }, on: :create
|
||||
|
||||
# Honeypot/anti-spam fields
|
||||
|
||||
Reference in New Issue
Block a user