PDA

View Full Version : How to automatically delete post of a banned user?


ZUCCO
01-30-2014, 02:44 AM
I want that when I ban an user all his posts are deleted at the same time, how? thank you :)

tbworld
01-30-2014, 04:35 AM
It would be much easier to prune threads by 'User name'. Otherwise, you could possibly use the code from the prune routine with the 'Banned' username/ID. Take a look at code 'admincp/thread.php' ...

If you are not a programmer you could simply insert a call at the end of the 'ban' routine, to the prune routine.
admincp/thread.php?do=pruneUnfortunately, showing you how to do this, is beyond the scope of a simple discussion and my time. You might want to request this in the paid/unpaid request forums.

If you decide to do the code yourself, show your code, and I can be of more assistance. :)

Barcham
01-30-2014, 05:57 PM
This is very easy to do. Select one of his posts and using the Moderation Tools at the bottom of the post, select "Delete as Spam". This will give you the option to delete all the user's posts, soft or hard delete, as well as ban the user permanently.

ZUCCO
01-31-2014, 02:25 AM
Thank you for your answers both is helpful :)

I will try