![]() |
Delete all attachments for user
Is there anyway to delete all the attachments for a user in vB4? I banned a user with over 800 attachments which serve no value to my forum. Is there an easy way to delete them without going through 80 pages of attachments in the admincp?
|
Login to his account or from admin panel is the only way
|
How are your attachments stored?
|
Quote:
|
You could do it with a sql query if you wanted, sorry I don't have the query for you though.
|
How would a SQL query delete the attachments in the file system?
|
If you know the user, and the userid
go to /path/to/attachments/u/s/e/r/I/d/ This folder has their attachment files. |
Ok... so I can delete the user's folder with their attachments in it. Cool, but what about the database?
delete from attachment where userid = (userid)? |
No, don't delete the users folder, the subfolder in there are for others. Just delete the attachment files.
Deleting them from the database gets more complicated. It'd probably be easier to manually reset the user's passwird and just go into his usercp and delete all of his attachments. |
There has to be a better way... at 20 attachments per page (and this guy has 800 attachments), this is going to take forever. Plus not to mention this is just one user. There are probably hundreds that have to be done.
|
Does the user show up in your "Five Users Whose Attachments Take Up the Most Space" via the attachment stats?
If so, you can click view attachments of that user there, then do a select all, on each page, as it shows only 10 per page. That will remove the files & the info from the post, not the fastest nor the easiest in your case of 800. Change line 671 of admincp/attachment.php to 50 or 100 or higher etc... Code:
$vbulletin->GPC['search']['results'] = 10; http://www.yoururlhere.com/forums/ad...=USERNAME HERE |
I will give this a shot and see what happens. I am hoping that will help solve the problem. The attachment stats though causes my server to timeout, so I will try by that new URL you provided.
|
All times are GMT. The time now is 05:49 PM. |
Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|