Simple Machines Community Forum

SMF Support => SMF 2.0.x Support => Topic started by: lucadanieli on January 11, 2019, 10:00:59 AM

Title: How to remove all posts of one user
Post by: lucadanieli on January 11, 2019, 10:00:59 AM
Hello,

I have a spam user. I removed it, but it didn't ask me to remove all its posts. Now I have just the posts and not the user. How can I solve the issue?

Best
Luca
Title: Re: How to remove all posts of one user
Post by: Aleksi "Lex" Kilpinen on January 11, 2019, 10:29:21 AM
If there are lots of those posts around probably easiest if you create a dummy user, reattribute posts to that user, then delete the dummy user and posts at once.
Title: Re: How to remove all posts of one user
Post by: lucadanieli on January 11, 2019, 12:03:20 PM
Thank you Aleksi.
How can I? In my Administrator -> Members, I do not have an option to create a dummy user.
Title: Re: How to remove all posts of one user
Post by: Aleksi "Lex" Kilpinen on January 11, 2019, 12:13:00 PM
Admin -> Members -> Registration -> Register new member :)

You can create a "dummy" user account from there.
Title: Re: How to remove all posts of one user
Post by: lucadanieli on January 11, 2019, 12:32:10 PM
Great, done!
Where should I go to reattribute the posts to the user?
Title: Re: How to remove all posts of one user
Post by: Aleksi "Lex" Kilpinen on January 11, 2019, 12:35:07 PM
Admin -> Maintenance -> Forum maintenance -> Members :)
Title: Re: How to remove all posts of one user
Post by: Owdy on July 23, 2019, 03:04:49 AM
Quote from: Aleksi "Lex" Kilpinen on January 11, 2019, 10:29:21 AM
If there are lots of those posts around probably easiest if you create a dummy user, reattribute posts to that user, then delete the dummy user and posts at once.
Seems that feature is broken. Removed user,, with all posts and topics, posts didnt get removed
Title: Re: How to remove all posts of one user
Post by: Owdy on July 23, 2019, 03:19:05 AM
Any SQL query for this?
Title: Re: How to remove all posts of one user
Post by: Aleksi "Lex" Kilpinen on July 23, 2019, 03:43:04 AM
Quote from: Owdy on July 23, 2019, 03:04:49 AM
Quote from: Aleksi "Lex" Kilpinen on January 11, 2019, 10:29:21 AM
If there are lots of those posts around probably easiest if you create a dummy user, reattribute posts to that user, then delete the dummy user and posts at once.
Seems that feature is broken. Removed user,, with all posts and topics, posts didnt get removed
How did you remove the user? It should work, but there are multiple ways to delete an account and if I remember correctly not all of them give the option. (Which is illogical, I know)
Title: Re: How to remove all posts of one user
Post by: Owdy on July 24, 2019, 02:18:28 AM
User profile -> delete user -> delete user with all content
Title: Re: How to remove all posts of one user
Post by: Aleksi "Lex" Kilpinen on July 24, 2019, 02:23:34 AM
Okay, that's odd - last time I've used it I'm pretty sure it worked. Any errors anywhere for clues?
Title: Re: How to remove all posts of one user
Post by: Owdy on July 24, 2019, 02:27:14 AM
Quote from: Aleksi "Lex" Kilpinen on July 24, 2019, 02:23:34 AM
Any errors anywhere for clues?
No, it just didnt do anything but removes profile. Content stays.
Title: Re: How to remove all posts of one user
Post by: Aleksi "Lex" Kilpinen on July 24, 2019, 03:02:34 AM
Just tried, and it worked for me - at least for posts. The test account I used didn't have any topics.
Title: Re: How to remove all posts of one user
Post by: Illori on July 24, 2019, 05:04:47 AM
Quote from: Owdy on July 24, 2019, 02:27:14 AM
Quote from: Aleksi "Lex" Kilpinen on July 24, 2019, 02:23:34 AM
Any errors anywhere for clues?
No, it just didnt do anything but removes profile. Content stays.

i dont think deleting posts/topics works that way when the account was re-attributed. i think it has been this way for years.
Title: Re: How to remove all posts of one user
Post by: Aleksi "Lex" Kilpinen on July 24, 2019, 05:06:05 AM
I wonder, why wouldn't it?
Title: Re: How to remove all posts of one user
Post by: Arantor on July 24, 2019, 05:14:00 AM
Because it doesn't reattribute correctly, posts are, but the topic starter isn't set up properly in the topics table.
Title: Re: How to remove all posts of one user
Post by: Aleksi "Lex" Kilpinen on July 24, 2019, 06:03:03 AM
Alright, a bug then.
Title: Re: How to remove all posts of one user
Post by: Owdy on July 26, 2019, 03:22:37 AM
Quote from: Aleksi "Lex" Kilpinen on July 24, 2019, 03:02:34 AM
Just tried, and it worked for me - at least for posts. The test account I used didn't have any topics.
Dont know what to say, doesnt work for me. CAnt remove spammers all posts at once
Title: Re: How to remove all posts of one user
Post by: GigaWatt on July 26, 2019, 09:13:35 AM
Quote from: Owdy on July 26, 2019, 03:22:37 AM
Dont know what to say, doesnt work for me. CAnt remove spammers all posts at once

Number of posts? If it's not that big, you could do it manually, at least as a temporary solution :).
Title: Re: How to remove all posts of one user
Post by: RFD on July 26, 2019, 09:25:11 AM
it can be done as illori shows us how ...

https://www.simplemachines.org/community/index.php?topic=568869.msg4025342#msg4025342
Title: Re: How to remove all posts of one user
Post by: Illori on July 26, 2019, 09:37:35 AM
Quote from: RFD on July 26, 2019, 09:25:11 AM
it can be done as illori shows us how ...

https://www.simplemachines.org/community/index.php?topic=568869.msg4025342#msg4025342

that does not work in this case if the posts were attributed to a new user.
Title: Re: How to remove all posts of one user
Post by: RFD on July 26, 2019, 09:48:02 AM
Quote from: Illori on July 26, 2019, 09:37:35 AM
Quote from: RFD on July 26, 2019, 09:25:11 AM
it can be done as illori shows us how ...

https://www.simplemachines.org/community/index.php?topic=568869.msg4025342#msg4025342

that does not work in this case if the posts were attributed to a new user.

too bad about the new user attribution - lesson learned by the OP, hopefully.
Title: Re: How to remove all posts of one user
Post by: Aleksi "Lex" Kilpinen on July 26, 2019, 11:08:46 AM
That was a lesson to learn for me, not so much for the OP in this case. As that is what I suggested on the first page of this topic.
Title: Re: How to remove all posts of one user
Post by: Owdy on July 27, 2019, 04:46:48 AM
Quote from: RFD on July 26, 2019, 09:25:11 AM
it can be done as illori shows us how ...

https://www.simplemachines.org/community/index.php?topic=568869.msg4025342#msg4025342
IT does not Work. Seriously
Title: Re: How to remove all posts of one user
Post by: Owdy on July 27, 2019, 04:48:09 AM
Attributed or not. Not working.
Title: Re: How to remove all posts of one user
Post by: Kindred on July 27, 2019, 10:15:43 AM
Owdy,

It works in cases where the topics are not reattributed. I confirmed that it worked...
it deleted all posts by the user and topics started by the user.

We also are aware that it does not work if the starting post in a topic has been reattributed to a user different from the original author. In this case, it will not delete topics which are supposed to be attributed to the user.
Title: Re: How to remove all posts of one user
Post by: Owdy on July 27, 2019, 02:21:12 PM
I dont know what to say.Spammer registers and posts multiple topics. I try to remove then with that feature. Nothing happeds.
Title: Re: How to remove all posts of one user
Post by: RFD on July 27, 2019, 02:30:06 PM
ban the spammer first, then go to the spammer's profile, click on 'actions' then 'delete this account', select 'topics and posts' from the remove posts option, DO NOT CHECK OFF 'delete this members account', then click the 'delete' button.
Title: Re: How to remove all posts of one user
Post by: Owdy on July 27, 2019, 02:49:22 PM
This is wierd, now it works :D