diff options
author | http://jneen.net/ <jneen@jneen.net> | 2017-03-01 01:15:27 +0300 |
---|---|---|
committer | http://jneen.net/ <jneen@jneen.net> | 2017-03-09 22:49:52 +0300 |
commit | bb0cba920ae5ce46ecc80907c445ddc85f3b4ed1 (patch) | |
tree | 2dab14f3df5fdd280644dd406ded9e65d4d3f705 /app | |
parent | 153d3e57285f2526bc5371dc7109ac9be07ae132 (diff) |
don't require ghost users to be blocked
Diffstat (limited to 'app')
-rw-r--r-- | app/models/user.rb | 7 |
1 files changed, 0 insertions, 7 deletions
diff --git a/app/models/user.rb b/app/models/user.rb index d725d37a355..520baf6e659 100644 --- a/app/models/user.rb +++ b/app/models/user.rb @@ -126,7 +126,6 @@ class User < ActiveRecord::Base validate :unique_email, if: ->(user) { user.email_changed? } validate :owns_notification_email, if: ->(user) { user.notification_email_changed? } validate :owns_public_email, if: ->(user) { user.public_email_changed? } - validate :ghost_users_must_be_blocked validates :avatar, file_size: { maximum: 200.kilobytes.to_i } before_validation :generate_password, on: :create @@ -455,12 +454,6 @@ class User < ActiveRecord::Base errors.add(:public_email, "is not an email you own") unless all_emails.include?(public_email) end - def ghost_users_must_be_blocked - if ghost? && !blocked? - errors.add(:ghost, 'cannot be enabled for a user who is not blocked.') - end - end - def update_emails_with_primary_email primary_email_record = emails.find_by(email: email) if primary_email_record |