fhe
(Florian)
22 בנובמבר, 2021, 4:37pm
4
I’ve did some further investigation and it might be related to the user in question being named “max ”. This seems to be in conflict with this line of code:
block_external_urls(user) if opts[:block_urls]
delete_posts(user, category_topic_ids, opts)
end
user.post_actions.each do |post_action|
post_action.remove_act!(Discourse.system_user)
end
# Add info about the user to staff action logs
UserHistory.staff_action_records(
Discourse.system_user, acting_user: user.username
).each do |log|
log.details ||= ''
log.details = (log.details.split("\n") +
["user_id: #{user.id}", "username: #{user.username}"]
).join("\n")
log.save!
end
# keep track of emails used
user_emails = user.user_emails.pluck(:email)