mirror of
https://github.com/discourse/discourse.git
synced 2025-06-04 23:36:11 +08:00
disable email white/blacklisting for staged users
This commit is contained in:
@ -72,7 +72,7 @@ class User < ActiveRecord::Base
|
||||
validates_presence_of :username
|
||||
validate :username_validator, if: :username_changed?
|
||||
validates :email, presence: true, uniqueness: true
|
||||
validates :email, email: true, if: :email_changed?
|
||||
validates :email, email: true, if: Proc.new { |u| !u.staged && u.email_changed? }
|
||||
validate :password_validator
|
||||
validates :name, user_full_name: true, if: :name_changed?
|
||||
validates :ip_address, allowed_ip_address: {on: :create, message: :signup_not_allowed}
|
||||
|
Reference in New Issue
Block a user