Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[CUSTDB-804] Better handling of user delete #319

Draft
wants to merge 2 commits into
base: 3.2.x
Choose a base branch
from

Conversation

battye
Copy link
Member

@battye battye commented Aug 2, 2020

I wanted to create a draft PR of this change because there's more visibility on GitHub rather than JIRA, so a bit easier to discuss changes. I still want to do more testing on this too, more on that below.

The basic idea behind this change, is that when a user is deleted in phpBB we will also handle their data removal in Titania:

  • Completely remove any contributions submitted by the user that don't have an approved revision
  • Delete Titania support topics created by the user
  • Delete Titania support posts created by the user

When deleting a user in phpBB, there will also be a message to indicate Titania data will be affected (I couldn't find an event to put the same message for pruning users unfortunately):

image

My questions

  1. Do we want any restrictions on the Titania posts/topics that are removed? I've currently restricted it to support topics, because I feel like we should be keeping the queue discussion topic if we have a contribution with an approved revision.

  2. Should we be deleting topics made by the user? What if they posted something which generated an important conversation?

  3. Should we respect the retain/remove flags from phpBB when considering whether to delete Titania posts/topics? At the moment I've just got it to delete from Titania regardless, but it's easy to change it so that it only does that if "remove" is selected in phpBB.

  4. I'm worried about these 2 SQL queries: delete topics sql and delete posts sql
    My eyes might have been deceiving me (it was late when I was testing yesterday 😛) but I think I saw an example where a topic created by another user (but replied to by the user I was deleting) ended up being removed. So I'm worried there's some logic behind topic_first_post_user_id that I'm unaware of; or perhaps something funny in $topic->delete(). I couldn't replicate the problem when I tried it today, all the posts and topics being removed were as I expected. But nonetheless I want to test that area some more, and I'm hopeful someone else might have an idea of what might have happened.

https://tracker.phpbb.com/browse/CUSTDB-804

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant