mirror of
https://github.com/discourse/discourse.git
synced 2025-03-22 12:38:54 +08:00
FIX: Use cached RegEx instead of recreating RegEx on every usage
This commit is contained in:
parent
ba232eab53
commit
b0ea919b09
@ -138,6 +138,6 @@ class UsernameValidator
|
||||
end
|
||||
|
||||
def self.allowed_char?(c)
|
||||
c.match?(/[\w.-]/) || c.match?(SiteSetting.allowed_unicode_username_characters)
|
||||
c.match?(/[\w.-]/) || c.match?(SiteSetting.allowed_unicode_username_characters_regex)
|
||||
end
|
||||
end
|
||||
|
Loading…
x
Reference in New Issue
Block a user