mirror of
https://github.com/discourse/discourse.git
synced 2025-06-05 23:44:48 +08:00
make robocop 🤖 happy
This commit is contained in:
@ -166,7 +166,7 @@ class User < ActiveRecord::Base
|
|||||||
SiteSetting.min_username_length.to_i..SiteSetting.max_username_length.to_i
|
SiteSetting.min_username_length.to_i..SiteSetting.max_username_length.to_i
|
||||||
end
|
end
|
||||||
|
|
||||||
def self.username_available?(username, email=nil)
|
def self.username_available?(username, email = nil)
|
||||||
lower = username.downcase
|
lower = username.downcase
|
||||||
return false if reserved_username?(lower)
|
return false if reserved_username?(lower)
|
||||||
return true if !User.exists?(username_lower: lower)
|
return true if !User.exists?(username_lower: lower)
|
||||||
|
Reference in New Issue
Block a user