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