mirror of
https://github.com/discourse/discourse.git
synced 2024-11-22 17:06:31 -06:00
Remove unecessary code.
This commit is contained in:
parent
f34d9202b4
commit
3b1e13e4ab
@ -6,7 +6,7 @@ class MaxUsernameLengthValidator
|
||||
def valid_value?(value)
|
||||
return false if value < SiteSetting.min_username_length
|
||||
@username = User.where('length(username) > ?', value).pluck(:username).first
|
||||
@username.blank? ? true : false
|
||||
@username.blank?
|
||||
end
|
||||
|
||||
def error_message
|
||||
|
@ -6,7 +6,7 @@ class MinUsernameLengthValidator
|
||||
def valid_value?(value)
|
||||
return false if value > SiteSetting.max_username_length
|
||||
@username = User.where('length(username) < ?', value).pluck(:username).first
|
||||
@username.blank? ? true : false
|
||||
@username.blank?
|
||||
end
|
||||
|
||||
def error_message
|
||||
|
Loading…
Reference in New Issue
Block a user