mirror of
https://github.com/codeninjasllc/discourse.git
synced 2024-11-27 09:36:19 -05:00
FIX: do not raise exception if user not found while rate limiting
This commit is contained in:
parent
557e59c28e
commit
6633b92d5f
1 changed files with 1 additions and 1 deletions
|
@ -13,7 +13,7 @@ class RateLimiter
|
|||
return @rate_limiter if @rate_limiter.present?
|
||||
|
||||
limit_key = "create_#{self.class.name.underscore}"
|
||||
max_setting = if user.new_user? and SiteSetting.has_setting?("rate_limit_new_user_#{limit_key}")
|
||||
max_setting = if user && user.new_user? and SiteSetting.has_setting?("rate_limit_new_user_#{limit_key}")
|
||||
SiteSetting.send("rate_limit_new_user_#{limit_key}")
|
||||
else
|
||||
SiteSetting.send("rate_limit_#{limit_key}")
|
||||
|
|
Loading…
Reference in a new issue