vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB4 General Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=251)
-   -   Delete all attachments for user (https://vborg.vbsupport.ru/showthread.php?t=296552)

Kevlar 03-27-2013 02:39 AM

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?

ForceHSS 03-27-2013 03:33 AM

Login to his account or from admin panel is the only way

Zachery 03-27-2013 03:36 AM

How are your attachments stored?

Kevlar 03-27-2013 01:15 PM

Quote:

Originally Posted by Zachery (Post 2412495)
How are your attachments stored?

In the file system ... currently we have about 40GB of attachments.

Brandon Sheley 03-27-2013 04:34 PM

You could do it with a sql query if you wanted, sorry I don't have the query for you though.

Kevlar 03-28-2013 12:59 PM

How would a SQL query delete the attachments in the file system?

Zachery 03-28-2013 04:43 PM

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.

Kevlar 03-28-2013 11:19 PM

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)?

Zachery 03-29-2013 06:07 PM

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.

Kevlar 03-30-2013 03:25 PM

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.


All times are GMT. The time now is 02:20 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
  • Page Generation 0.01342 seconds
  • Memory Usage 1,726KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (1)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (10)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete