vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB4 General Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=251)
-   -   How to mass delete this users? (https://vborg.vbsupport.ru/showthread.php?t=269175)

Divvy 08-26-2011 11:22 AM

How to mass delete this users?
 
Hello guys,

I notice that many spammers have the word "Man" in their Biography field.
I did a search and found 7544 users... and I want to delete them all, but the only option that I see, is to delete one by one...
Is there any option to delete all this users with those criteria?

Thank you

kh99 08-26-2011 01:21 PM

I've tried this for only one test user and it seems to work but you probably want to have a backup of your database first.

There's no function to mass delete users by a profile field, but you can prune users by usergroup. So you could do this:

- Create a temporary user group, note the id number.
- Execute this SQL query:

Code:

UPDATE user LEFT JOIN userfield ON (user.userid = userfield.userid)
SET user.usergroupid = X WHERE field1 = 'Man'

but replace X with the id of the temp group you created. (If your db has a table prefix you'll need to modify the query to include it).

- In the adminCP go to Users -> Search for Users and search for users in your temp user group, make sure the list of users looks like the ones you want to delete.
- Go to Users -> Prune/Move Users, select your temporary user group and enter '0' for the 'Has not logged on for x days' field. Press 'Find'
- On the next page select 'delete' and press the 'Go' button.


All times are GMT. The time now is 03:50 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.00957 seconds
  • Memory Usage 1,708KB
  • 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_code_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (2)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
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete