Deleting user 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.
ert4
Registered User
Posts: 132
Joined: Fri Jan 27, 2006 6:37 pm

Deleting user posts

Post by ert4 »

hello,

how can I delete all topics and posts of user X, who was once deleted from the forum? only his posts and topics on the forum are left. is there any sql query that will do it automatically? thanks for the help
User avatar
thecoalman
Community Team Member
Community Team Member
Posts: 6835
Joined: Wed Dec 22, 2004 3:52 am
Location: Pennsylvania, U.S.A.

Re: Deleting user posts

Post by thecoalman »

If it's just handful of posts you can find them with:

Code: Select all

example.com/search.php?author_id=1
You can find them in DB using this, XYZ is the username:

Code: Select all

SELECT * FROM phpbb_posts WHERE post_username = 'XYZ'; 
I don't know if there is any unforeseen consequences if you delete them though DB so I would strongly suggest you don't unless someone else more knowledgeable says otherwise.
“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
Brf
Support Team Member
Support Team Member
Posts: 53666
Joined: Tue May 10, 2005 7:47 pm
Location: {postrow.POSTER_FROM}

Re: Deleting user posts

Post by Brf »

Deleting the first post or the last post of a topic will mess them up if you don't also fix the topic table. It is safer to delete them normally.
ert4
Registered User
Posts: 132
Joined: Fri Jan 27, 2006 6:37 pm

Re: Deleting user posts

Post by ert4 »

the user on the forum is a guest and has the name "electronix", you can't even click on his name because he doesn't have a registered profile, and I have to delete 8000 posts of this user so I can't do it manually... only with an sql query to the database?
User avatar
KevC
Support Team Member
Support Team Member
Posts: 72821
Joined: Fri Jun 04, 2004 10:44 am
Location: Oxford, UK

Re: Deleting user posts

Post by KevC »

Is it because they have requested the removal?

You should be able to change the username if they don't want that name being shown but it'll still be in any quoted text. I've had people ask before to have all their posts removed, I've said no because it's really complicated and messes up the topic flow and they've just said fine, leave it.

The name isn't clickable because the profile has already been disabled or deleted. If it's only been deactivated, you can change the username in the admin panel.
-:|:- Support Request Template -:|:-
Image
"Step up to red alert. Sir, are you absolutely sure? It does mean changing the bulb"
User avatar
thecoalman
Community Team Member
Community Team Member
Posts: 6835
Joined: Wed Dec 22, 2004 3:52 am
Location: Pennsylvania, U.S.A.

Re: Deleting user posts

Post by thecoalman »

You can go to Users tab, put check next to "select anonymous user". Should be 8000 plus posts listed for anonymous.

You can select delete posts under basic tools but this is going to delete any posts by guest users. If you have other guest users with posts you want to keep there is other solutions.

Note you might want to go into your hosting control panel and increase the max execution time for php before deleting.
“Results! Why, man, I have gotten a lot of results! I have found several thousand things that won’t work.”

Attributed - Thomas Edison
ert4
Registered User
Posts: 132
Joined: Fri Jan 27, 2006 6:37 pm

Re: Deleting user posts

Post by ert4 »

this is a spammer who added erotic posts and I need to delete it but how?
LePaul
Registered User
Posts: 74
Joined: Sat Feb 23, 2013 9:50 pm

Re: Deleting user posts

Post by LePaul »

ert4 wrote: Fri May 09, 2025 5:56 pm this is a spammer who added erotic posts and I need to delete it but how?
In User Administration, when you pull up the user, at the bottom it says "Delete User"
There's a pull down menu that says "Delete Posts"

I use that to eliminate bad users/spammers and take their posts out too
ert4
Registered User
Posts: 132
Joined: Fri Jan 27, 2006 6:37 pm

Re: Deleting user posts

Post by ert4 »

only these posts are as guest (unregistered user)

Return to “[3.3.x] Support Forum”