Possible to delete multiple users at once?

Get help with installation and running phpBB 3.0.x here. Please do not post bug reports, feature requests, or MOD-related questions here.
Scam Warning

Possible to delete multiple users at once?

Postby sc123 » Fri Mar 21, 2008 8:30 pm

Is there a way to display a list of users and "select all" or something of that nature to delete them? In phpbb 2.0 I installed a mod to do this from a member list but I can't find anything like that for 3.0.
sc123
Registered User
 
Posts: 52
Joined: Fri Jul 20, 2007 6:12 am

Re: Possible to delete multiple users at once?

Postby karlsemple » Fri Mar 21, 2008 8:33 pm

You can delete multiple users by using the prune users feature in the Admin control panel -> users and groups tab -> users security -> prune users

Please backup before using this feature as it is powerful and no going back after using it :)
Image
User avatar
karlsemple
Former Team Member
 
Posts: 39802
Joined: Mon Nov 01, 2004 8:54 am
Location: Hereford, UK

Re: Possible to delete multiple users at once?

Postby sc123 » Fri Mar 21, 2008 9:00 pm

Pruning doesn't seem to allow me to choose users from a list or delete multiple users at once by choosing the users. I can't just remove users using criteria like "joined before a certain day". I just need to be able to select from a list and delete multiple users at once.
sc123
Registered User
 
Posts: 52
Joined: Fri Jul 20, 2007 6:12 am

Re: Possible to delete multiple users at once?

Postby karlsemple » Fri Mar 21, 2008 9:31 pm

sc123 wrote:Pruning doesn't seem to allow me to choose users from a list or delete multiple users at once by choosing the users. I can't just remove users using criteria like "joined before a certain day". I just need to be able to select from a list and delete multiple users at once.



look at the prune section again...there is a find a member list which will allow you to select multiple users and then prune them away
Image
User avatar
karlsemple
Former Team Member
 
Posts: 39802
Joined: Mon Nov 01, 2004 8:54 am
Location: Hereford, UK

Re: Possible to delete multiple users at once?

Postby sc123 » Fri Mar 21, 2008 9:49 pm

Thanks - I just assumed that link would bring up the same interface as the other with the same name that doesn't allow you to select multiple users.
sc123
Registered User
 
Posts: 52
Joined: Fri Jul 20, 2007 6:12 am

Re: Possible to delete multiple users at once?

Postby dmarsiglio » Sat May 17, 2008 2:15 am

Thanks for the thread. It sounds like you've had some success. But i can't seem to find the 'users and groups tab'. Where is that exactly? (sorry i'm quite new to phpBB)
dmarsiglio
Registered User
 
Posts: 1
Joined: Sat May 17, 2008 2:12 am

Re: Possible to delete multiple users at once?

Postby sc123 » Sat May 17, 2008 3:07 am

In your Admin Control Panel (ACP) the "Users and Groups" tab is at the top to the right of "Posting". You probably aren't even logged into the ACP if you don't see it.

Log into your forum as an admin user and look for the ACP link at the bottom of the page.
sc123
Registered User
 
Posts: 52
Joined: Fri Jul 20, 2007 6:12 am

Re: Will it also delete the posts?

Postby PhilEsq » Fri Jun 26, 2009 8:19 pm

Will pruning also delete the posts associated with the users?
Philip L. Franckel, Esq.
www.HURT911.org
User avatar
PhilEsq
Registered User
 
Posts: 117
Joined: Sun May 22, 2005 3:14 pm
Location: U.S.A.

Re: Will it also delete the posts?

Postby PhilEsq » Fri Jun 26, 2009 8:25 pm

I just answered my own question. You can delete all the posts also.
PhilEsq wrote:Will pruning also delete the posts associated with the users?
Philip L. Franckel, Esq.
www.HURT911.org
User avatar
PhilEsq
Registered User
 
Posts: 117
Joined: Sun May 22, 2005 3:14 pm
Location: U.S.A.

Re: Possible to delete multiple users at once?

Postby castorcanadensis » Sat Jan 15, 2011 9:53 am

"look at the prune section again...there is a find a member list which will allow you to select multiple users and then prune them away"

I can't find this. Can you explain where it is, please?

Thanks
Graham.
castorcanadensis
Registered User
 
Posts: 42
Joined: Thu Apr 09, 2009 9:22 pm

Re: Possible to delete multiple users at once?

Postby Markstar » Fri Apr 08, 2011 8:24 am

castorcanadensis wrote:"look at the prune section again...there is a find a member list which will allow you to select multiple users and then prune them away"

I can't find this. Can you explain where it is, please?

Thanks
Graham.
Administration Control Panel -> Users and Groups -> Prune users -> Under the "Prune users" field is a link "Find a member".

I have my own question as well: Can I simply delete unwanted users (who have made no posts) from the "users" table in the database?

Thanks in advance!
Markstar
Registered User
 
Posts: 72
Joined: Mon May 01, 2006 6:26 pm

Re: Possible to delete multiple users at once?

Postby stevemaury » Fri Apr 08, 2011 1:28 pm

ABSOLUTELY NOT!!!

There are entries for them in other tables, whether they have posted or not.
For REALLY good and VERY inexpensive hosting CLICK HERE

http://www.stevesstocks.com

All unsolicited PMs will be ignored.
User avatar
stevemaury
Support Team Member
Support Team Member
 
Posts: 44073
Joined: Thu Nov 02, 2006 12:21 am
Location: The U.P.
Name: Steve

Re: Possible to delete multiple users at once?

Postby tunkkaamo » Sun Dec 09, 2012 11:41 am

stevemaury wrote:ABSOLUTELY NOT!!!

There are entries for them in other tables, whether they have posted or not.


I tested following on a test server where i have a backup of the actual:

Lets say you want to see all users who have registered before 1.1.2012 and have zero posts and zero private messages.
In mysql command line:


SELECT username,user_last_privmsg,user_posts FROM phpbb_users WHERE user_regdate < 1345766400 AND user_posts=0 AND user_last_privmsg=0;

Then you get a list of those unactive users, registered about one year ago.
1345766400 is 1.1.2012 00:00:00 in Unix format.
You can convert normal dates to Unix format here: http://www.epochconverter.com/

If you are happy with your result from the SELECT statement, you can delete the users with following statement:

---USE AT YOUR OWN RISK!!!!
[Under no circumstances should you actually do this. We will not be able to help you if you do - Marshalrusty]
DELETE FROM phpbb_users WHERE user_regdate < 1345766400 AND user_posts=0 AND user_last_privmsg=0;

---USE AT YOUR OWN RISK!!!!

Like I said, I did run this on a test server, and the board was running ok after deleting a couple of thousand zero posts and zero private messages users.

You said the above script is not ok and might brake relations to other tables?
Is there any documentation to this as I really would like to use the script on a live site.
tunkkaamo
Registered User
 
Posts: 8
Joined: Sat Dec 08, 2012 7:45 pm

Re: Possible to delete multiple users at once?

Postby Lumpy Burgertushie » Mon Dec 10, 2012 4:38 pm

I wonder why you don't belive the support staff when they say something. they are the ones that know how phpbb works.

just because the board is still working does not mean that what they said is incorrect. each time a user is created there are entries into several different tables in the database. if you only delete the entries from the users table you are leaving all those others and it could easily cause problems down the road.

now, why do you not wish to use the method provided in the admin panel for pruning/deleting users?

had you done so in this case, it would already have been done by the time you could connect to the database and run your query and then run the nex query etc.

and, it would have been done correctly the way the board was designed to work.

luck,
robert
User avatar
Lumpy Burgertushie
Registered User
 
Posts: 51596
Joined: Mon May 02, 2005 3:11 am

Re: Possible to delete multiple users at once?

Postby stevemaury » Mon Dec 10, 2012 6:24 pm

Note that, among other issues, your query does not clean up the user_group table. That means if the Newly registered users group is used, whether it is or isn't the default, you will have a non-existent user_id in the user_group table.

Other issues are if the user has posted in a forum that does not increment post counts, or if the user has unapproved posts.
For REALLY good and VERY inexpensive hosting CLICK HERE

http://www.stevesstocks.com

All unsolicited PMs will be ignored.
User avatar
stevemaury
Support Team Member
Support Team Member
 
Posts: 44073
Joined: Thu Nov 02, 2006 12:21 am
Location: The U.P.
Name: Steve

Next

Return to 3.0.x Support Forum

Who is online

Users browsing this forum: Bing [Bot], drew2k14, hewmac06, italy70, oBot, roger12, uktrader6 and 89 guests