Change the way nuked users' posts are handled. Allow null in the user_id column of posts. Show these posts in the posts stream.

This commit is contained in:
Neil Lalonde
2013-09-03 17:19:29 -04:00
parent 1a6170a47c
commit 117fc8db58
16 changed files with 123 additions and 50 deletions

View File

@@ -34,7 +34,7 @@ class UserDestroyer
b = ScreenedEmail.block(u.email, ip_address: u.ip_address)
b.record_match! if b
end
Post.with_deleted.where(user_id: user.id).update_all("nuked_user = true")
Post.with_deleted.where(user_id: user.id).update_all("user_id = NULL")
StaffActionLogger.new(@staff).log_user_deletion(user, opts.slice(:context))
DiscourseHub.unregister_nickname(user.username) if SiteSetting.call_discourse_hub?
MessageBus.publish "/file-change", ["refresh"], user_ids: [user.id]