mirror of
https://github.com/discourse/discourse.git
synced 2025-06-03 02:48:28 +08:00
DEV: Style and performance improvements
Follow-up from 9db8291
This commit is contained in:
@ -4,7 +4,7 @@ class UserAssociatedAccount < ActiveRecord::Base
|
||||
def self.cleanup!
|
||||
# This happens when a user starts the registration flow, but doesn't complete it
|
||||
# Keeping the rows doesn't cause any technical issue, but we shouldn't store PII unless it's attached to a user
|
||||
self.where("user_id IS NULL AND updated_at < ?", 1.day.ago).destroy_all
|
||||
self.where("user_id IS NULL AND updated_at < ?", 1.day.ago).delete_all
|
||||
end
|
||||
end
|
||||
|
||||
|
Reference in New Issue
Block a user