Agora logo
Welcome to Agora!
 → 

A button to delete all the posts of a user ?



«  [1]  »
VignacSecond
That's exist ?
Pecon
Administrator
Quote from: VignacSecond
That's exist ?

It does not. However, you can accomplish this with an SQL query on the database.

Code
DELETE FROM `posts` WHERE userID=#;

Just replace the # with the ID of the user you are clearing posts for.
If they created any topics you want gone then you'll have to run another query:
Code
DELETE FROM `topics` WHERE creatorUserID=#;


You'll probably want to avoid doing this unless you have to, because there will be minor side effects since the normal deletion process for posts and threads also involves correcting some index information which is difficult to do manually.
VignacSecond
Quote from: Pecon
Quote from: VignacSecond
That's exist ?

It does not. However, you can accomplish this with an SQL query on the database.

Code
DELETE FROM `posts` WHERE userID=#;

Just replace the # with the ID of the user you are clearing posts for.
If they created any topics you want gone then you'll have to run another query:
Code
DELETE FROM `topics` WHERE creatorUserID=#;


You'll probably want to avoid doing this unless you have to, because there will be minor side effects since the normal deletion process for posts and threads also involves correcting some index information which is difficult to do manually.


Okay thanks :)
«  [1]  »