users: log restricted signups to NewRelic.
When a new user creates an account and their account is automatically restricted, log the reason why to NewRelic.
This commit is contained in:
@@ -26,6 +26,10 @@ class UserVerifier
|
||||
end
|
||||
end
|
||||
|
||||
def log!
|
||||
DanbooruLogger.add_attributes("user_verifier", to_h)
|
||||
end
|
||||
|
||||
private
|
||||
|
||||
def ip_address
|
||||
@@ -55,5 +59,9 @@ class UserVerifier
|
||||
IpLookup.new(ip_address).is_proxy?
|
||||
end
|
||||
|
||||
def to_h
|
||||
{ is_ip_banned: is_ip_banned?, is_logged_in: is_logged_in?, is_recent_signup: is_recent_signup?, is_proxy: is_proxy? }
|
||||
end
|
||||
|
||||
memoize :is_ip_banned?, :is_proxy?, :is_recent_signup?
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user