Community

How do I delete a lot of users and also comments in Drupal 6, please?

3 years 34 weeks ago I made a testsite following videos from Lullabot for a fictive site called ninesixtyrobots. I still have this site and use it to be better understand Drupal but have also started to test Drupal 7 sites though. :-)

But there have been tons of users now and comments which I want to delete and started yesterday but after 1/2 hour I stopped and think there must be an easier way, right?

I have now said in content types that it's NOT possible to post comments and that Admin ONLY can make new users but need to get all this idiots out there deleted.

Someone have a suggesting, please? Maybe in phpMyAdmin or?

Comments

Have you tried using Views

Have you tried using Views Bulk Operations? That should do the trick.

I'm unique, just like everybody else.
If I helped, please pay it forward, backward or sidelong.

I have used this

I have used this http://tinemuller.dk/div/Views_Bulk.gif - not sure if it's called Views Bulk Operations?

But it take too long time - I still have 36 rows where only the two last I want to be there. They were made from the instruction video with Devel module.

Thougt there may be a faster way but maybe not?

No- that looks like the

No- that looks like the standard users view.

You want to install views bulk operations http://drupal.org/project/views_bulk_operations
You'll also need views and views_ui (included in views modules)
See the vbo documentation or one of the many refs on it's module page for extra help but here's a basic way to do it:

rough directions for drupal 7:
Install those modules.
Create a new view to show users, fields. add a page view, table layout
Add a new field 'views bulk operations'
In the config uncheck 'force single' if checked. you want to apply single operation to all selected rows (i think that's default).
You also want to check the option to 'select all in all pages' or similar but be careful - if doing this you'll want to add filters so only the users you want to delete show up in the view.
check the box for the action you want to do - delete in this case. choose the options to do it as a batch.
save. go to the view. you should be able to check the select all box, choose the delete action and execute.

I think vbo has a default view you can enable for this purpose as well.

...you probably want to backup your database prior to doing this, just in case. :)

I'm unique, just like everybody else.
If I helped, please pay it forward, backward or sidelong.

Thanks for trying to help I

Thanks for trying to help I really appreciate this.

I use Drupal 6.20 so I downloaded http://drupal.org/project/views_bulk_operations 6-x-1.13 and in README.txt is a lot info.

line 9: if you're using Views 6.x-3.x, you also need to add the "Node: Nid" field. You can set it as "Exclude from display", as VBO only needs it internally.

But I can't see which version of Views I'm using so don't know if I should do what they tell?

See how many stupid comments there are http://ninesixtyrobots.tinemuller.dk/

I made a test view but for now I have disabled bulk module because I'm afraid spammers could make problems and will select it again when I know some more.

You are probably using views 2

If you are on Drupal 6 and downloaded the 'green' recommended version you are on views 2.
The reason for the difference is that in views 3 VBO is a views field rather than a style (at least it's that way in 7)
You can add the nid in d6 v2 as well- it does no harm to add it and then it'll be available if it is needed.

I'm unique, just like everybody else.
If I helped, please pay it forward, backward or sidelong.

Still glad you use time to

Still glad you use time to help me.
Yes I know that Views 2 goes with Drupal 6 and Views 3 goes with Drupal 6 but why does he mention "Views 6.x-3.x" and why can't I see what version I use when I click /admin/reports/updates? The only thing it says is Drupal core 6.10 should be updated to 6.26 and Modules Administration menu 6.x-1.8 is up to date. - Where else can I see what version of Views I use?

Before I use a lot of more hours are you sure I can use this to delete a LOT of users and comments better than the "default" way I showed you in PrintScreen?

as to why...

Well the views version should show in the modules list if nowhere else. I don't have a d6 version handy to check atm but I thought it did display the version on the update manager page. At worst you can look at the physical views.info file in the module.

Is this way better? well if you are comfortable with views you can add filters to select just the comments you want to delete and delete all at once. The base VBO view that comes with the module should give you a good base to start from.

I'm unique, just like everybody else.
If I helped, please pay it forward, backward or sidelong.