mirror of
https://github.com/discourse/discourse.git
synced 2025-02-25 18:55:32 -06:00
REFACTOR: Always validate email by default.
This commit is contained in:
@@ -3,7 +3,7 @@ require_dependency 'email_validator'
|
||||
class UserEmail < ActiveRecord::Base
|
||||
belongs_to :user
|
||||
|
||||
attr_accessor :should_validate_email
|
||||
attr_accessor :skip_validate_email
|
||||
|
||||
before_validation :strip_downcase_email
|
||||
|
||||
@@ -24,7 +24,7 @@ class UserEmail < ActiveRecord::Base
|
||||
end
|
||||
|
||||
def validate_email?
|
||||
return false unless self.should_validate_email
|
||||
return false if self.skip_validate_email
|
||||
email_changed?
|
||||
end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user