mirror of
https://github.com/discourse/discourse.git
synced 2026-08-14 06:55:03 -05:00
Track the ip address where user was registered
This commit is contained in:
@@ -40,9 +40,11 @@ class UserDestroyer
|
||||
b = ScreenedEmail.block(u.email, ip_address: u.ip_address)
|
||||
b.record_match! if b
|
||||
end
|
||||
if opts[:block_ip]
|
||||
b = ScreenedIpAddress.watch(u.ip_address)
|
||||
b.record_match! if b
|
||||
if opts[:block_ip] && u.ip_address
|
||||
b.record_match! if b = ScreenedIpAddress.watch(u.ip_address)
|
||||
if u.registration_ip_address && u.ip_address != u.registration_ip_address
|
||||
b.record_match! if b = ScreenedIpAddress.watch(u.registration_ip_address)
|
||||
end
|
||||
end
|
||||
Post.with_deleted.where(user_id: user.id).update_all("user_id = NULL")
|
||||
|
||||
|
||||
Reference in New Issue
Block a user