Delete user - with hint in posts

Get help with installation and running phpBB 3.3.x here. Please do not post bug reports, feature requests, or extension related questions here.
Post Reply
webracer999
Registered User
Posts: 5
Joined: Sat Jan 25, 2020 5:18 pm

Delete user - with hint in posts

Post by webracer999 »

Hi,

I found two options for deleting users: keep or delete their posts.

Is there a middle way available? So only the content of the posts are "deleted". Some replacement like: "This post was from a deleted user."?

I administer a forum about OCD. I would like to give users the option that I delete their posts as well. But if I I choose to delete their posts, there are missing posts in between the threads. So the threads are hard to follow. (We have many threads going on over the years - and a lot of anonymous users which only read.)
User avatar
3Di
I've Been Banned!
Posts: 17538
Joined: Mon Apr 04, 2005 11:09 pm
Location: I'm with Ukraine 🇺🇦
Name: Marco
Contact:

Re: Delete user - with hint in posts

Post by 3Di »

No.
🆓 Free support for our extensions also provided here: phpBB Studio
🚀 Looking for a specific feature or alternative option? We will rock you!
Please PM me only to request paid works. Thx. Buy me a coffee -> Image
My development's activity º PhpStorm's proud user º Extensions, Scripts, MOD porting, Update/Upgrades
webracer999
Registered User
Posts: 5
Joined: Sat Jan 25, 2020 5:18 pm

Re: Delete user - with hint in posts

Post by webracer999 »

Is this requirement too exotic? Or is it worth creating a new "phpBB Idea".
User avatar
KevC
Support Team Member
Support Team Member
Posts: 72343
Joined: Fri Jun 04, 2004 10:44 am
Location: Oxford, UK
Contact:

Re: Delete user - with hint in posts

Post by KevC »

You would need to request an extension.

The difficulty comes where someone has a lot of posts. What if I wanted to be removed and tens of thousands of posts have to be changed along with all the places they've been quoted as well. That's a huge query to run on the database.

The current options to deactivate and/or rename the account totally anonymises the comments already.
-:|:- Support Request Template -:|:-
Image
"Step up to red alert. Sir, are you absolutely sure? It does mean changing the bulb"
User avatar
HiFiKabin
Community Team Member
Community Team Member
Posts: 6673
Joined: Wed May 14, 2014 9:10 am
Location: Swearing at the PC, UK
Name: James
Contact:

Re: Delete user - with hint in posts

Post by HiFiKabin »

If the poster has been deleted then the post will look like this

screenshot_667.jpg

With no information (other than the posters name) it should be reasonably clear that they are no longer a member


or add an avatar to the Guest Group (assuming that you do not allow guest postings) such as this

deleted.png
deleted.png (3.83 KiB) Viewed 1133 times

giving you

screenshot_668.jpg
webracer999
Registered User
Posts: 5
Joined: Sat Jan 25, 2020 5:18 pm

Re: Delete user - with hint in posts

Post by webracer999 »

KevC wrote: Wed Jun 16, 2021 9:05 am The difficulty comes where someone has a lot of posts. What if I wanted to be removed and tens of thousands of posts have to be changed along with all the places they've been quoted as well. That's a huge query to run on the database.
Oh, I missed the quotes ...
Yes, you are right - it's very tricky - also if there are a lot of posts of the user ...

Deactivation, renaming, deletion with keeping posts is sometime not enough for my users.
It's a health related forum [1] and some have problems with their OCD when the posts are kept online.

But thank you for your feedback! I got the point, that's not as easy as I thought - and it's a little special requirement :).
Maybe I will sometime try to write a own extension for that, but it's challenging. ;)

[1] btw: Thanks to all the phpBB contributors and community for enabling our club to provide a forum for that topic to help people with their disease!
User avatar
thecoalman
Community Team Member
Community Team Member
Posts: 5871
Joined: Wed Dec 22, 2004 3:52 am
Location: Pennsylvania, U.S.A.
Contact:

Re: Delete user - with hint in posts

Post by thecoalman »

You could do it with SQL query.

Code: Select all

UPDATE phpbb_posts SET post_text = '<r>Post removed by request of poster.</r>' WHERE poster_id = XYZ
XYZ needs to be edited with the poster ID which is a number, you can get the number from the link to their profile or other places. Giant warning here, make sure you have database backup and make sure the poster id number is right. There is no going back without a backup and even with the backup it is not a simple one line fix.

Once you run the SQL you can delete the user keeping their posts.

Removing quoted posts is not impossible but you would need to use REGXP_REPLACE with regex.

https://mariadb.com/kb/en/regexp_replace/
“Results! Why, man, I have gotten a lot of results! I have found several thousand things that won’t work.”

Attributed - Thomas Edison
User avatar
warmweer
Jr. Extension Validator
Posts: 11234
Joined: Fri Jul 04, 2003 6:34 am
Location: Van Allen Bel ... gium
Contact:

Re: Delete user - with hint in posts

Post by warmweer »

webracer999 wrote: Wed Jun 16, 2021 9:53 am
KevC wrote: Wed Jun 16, 2021 9:05 am The difficulty comes where someone has a lot of posts. What if I wanted to be removed and tens of thousands of posts have to be changed along with all the places they've been quoted as well. That's a huge query to run on the database.
Oh, I missed the quotes ...
There's also an extra (more or less theoretical) difficulty.
Quotes can be formed various way.

The top part in this post is me quoting you post using the default phpBB way
But the following quote
webracer999 wrote:Oh, I missed the quotes ...
is "constructed" ... and I could have assigned it to different user
afakewebracer999 wrote:Oh, I missed the quotes ...
or i could even fool around more
webracer999 wrote:Oh, I missed the party ...
or ... completely fake the data (check the name, date, user_id ;-) )
webracer989 wrote: Wed Jun 10, 1970 3:40 am Yay, found the quotes
Things like this will mess up the logical SQL which would "clean" the quoted posts.

On my boards, my principle has always been: posts made will not be deleted if a user is deleted in order to maintain "normal/logical" flow of the discussions. However exceptions can be made if requested (and with good argumentation).
And that implies some manual labour
Spelling is freeware, which means you can use it for free.
On the other hand, it is not open source, which means you cannot change it or publish it in a modified form.


Time flies like an arrow, but fruit flies like a banana.
webracer999
Registered User
Posts: 5
Joined: Sat Jan 25, 2020 5:18 pm

Re: Delete user - with hint in posts

Post by webracer999 »

Thank you thecoalman for the query.

And thank you warmweer for the input. I think your principle for your boards is also practicable for me.
Of course the "middle way" (hint, that post was deleted) would be nice - but I've totally underrated the technical effort for that.
User avatar
KevC
Support Team Member
Support Team Member
Posts: 72343
Joined: Fri Jun 04, 2004 10:44 am
Location: Oxford, UK
Contact:

Re: Delete user - with hint in posts

Post by KevC »

Deactivation, renaming, deletion with keeping posts is sometime not enough for my users.

The other option is that it's not up to the users what happens when they want their account removed. It's your board. You say sorry they posts stay and your account is deactivated and that you can change the name of it but the content stays. Even add it to the rules and regs of the site if you want.
-:|:- Support Request Template -:|:-
Image
"Step up to red alert. Sir, are you absolutely sure? It does mean changing the bulb"
webracer999
Registered User
Posts: 5
Joined: Sat Jan 25, 2020 5:18 pm

Re: Delete user - with hint in posts

Post by webracer999 »

Yes, you are in principle right. Also on legal/privacy side I don't have to remove the old posts.
I will appeal to the user, that the old posts keeps online. And otherwise I will make a decision on the individual case.
Post Reply

Return to “[3.3.x] Support Forum”