Fork me on GitHub
Subscribe 7

Ticket #168 (fixed enhancement)

Mass delete/ban/change group of users

  • Created: 2010-10-24 22:42:56
  • Reported by: Reines
  • Assigned to: Franz
  • Milestone: 1.4.5
  • Component: usability
  • Priority: normal

In the admin users list it would be useful to add checkboxes in the result list, which can be used to select then mass delete/ban/change the group of users. We should also provide a "select all/none" button.

This will make handling spam user accounts and unverified users easier.


Franz 2010-10-24 22:47:23

Does this need to be in 1.4.3? I know that planning things for yet another release already now might be a weird idea, but then we should also move on.

Reines 2010-10-24 22:51:55

Doesn't need to be no, we could consider adding a 1.4.4 milestone and pushing a few tickets back I guess.

Reines 2010-10-25 11:20:25

  • Milestone changed from 1.4.3 to 1.4.4.

Franz 2010-12-08 21:09:43

  • Owner set to Franz.

Reines 2011-01-26 11:22:02

  • Milestone changed from 1.4.4 to 1.4.5.

taylorchu 2011-02-09 23:51:15

this would be the best feature of 1.4.5. right now, my fluxbb forum has more than 50 unverified users. selecting all can save a lot of time. in addition, it might make the problem described in the link above not so urgent: "Auto deletion of not verified registrations".

Franz 2011-02-10 14:30:13

What exactly would "changing" users mean?

quy 2011-02-10 16:39:20

What exactly would "changing" users mean?

Assign selected user(s) to a different user group.

Franz 2011-02-10 16:43:10

So that's a completely new form or can I adapt an existing one to work for multiple users, too?

quy 2011-02-10 16:49:47

You can adapt from existing forms such as "move topics", "delete group".

Franz 2011-03-09 12:08:33

Mass user deletion feature is finally finished. Now for the rest.

Franz 2011-03-09 12:09:02

  • Summary changed from Add checkboxes to select then mass delete/ban/change group of users to Mass delete/ban/change group of users.

Franz 2011-03-09 13:56:59

Where should I put the two JavaScript functions (for selecting / unselecting all checkboxes)?

We currently don't have an extra file with all the JavaScript we use (simply because there isn't a lot).

Putting it in the header on every page seems like a waste. I could just put it in the code of admin_reports.php, but then we might want to use the functions on other pages, too, in the future.

Reines 2011-03-09 14:02:35

Just stick it in a .js file either in the root dir or the style dir (neither seem quite ideal, but meh...) then in admin_reports.php add it using $page_head - if we need it anywhere else we can just add the same way.

Franz 2011-03-11 13:59:46

This query is supposed to fetch the IPs that were stored with their latest post - for a group of users.

SELECT p.poster_id, p.poster_ip
FROM forum_posts AS p
    SELECT MAX(id) AS id
    FROM forum_posts
    WHERE poster_id IN (1,2,3,4,5)
    GROUP BY poster_id
) AS i
ON =

The query does it's job (thanks, Jamie!), but can somebody please test this on PostgreSQL and SQLite? I don't have these installed right now.

Reines 2011-03-11 14:07:44

Tested on SQLite2 and seems fine. I don't have PostgreSQL set-up anywhere, though I would suggest just implementing everything and commit it/attach a patch, then if no-one has tested it by then I'll set-up a PostgreSQL install at home.

Franz 2011-03-11 14:08:59

Yeah, I'm about ready to open up a pull request (obviously, the changes are quite big) for some more testing.

I only need to figure out how to implement "changing" users now.

Reines 2011-03-12 13:32:15

I know you're almost done with this, but I'm actually wondering if it would make sense to push back to 1.4.6 so we have time to actually do some testing with it on first? Thoughts?

Franz 2011-03-12 13:42:14

Could be.
I'm fine with having it pushed back again, but can we wait with that until we're done with everything else for 1.4.5? If that takes a while, too, maybe it can still be included!?

Reines 2011-03-12 14:14:10

Sure that makes sense.

MattF 2011-03-12 16:54:10

Appears to work fine on PgSQL. I've merely run the query to check it returns expected results and doesn't throw an error, but seems fine.

Franz 2011-03-12 17:27:58

Max. one row per user ID means it works, I'd say.
Thanks for checking, Matt!

Franz 2011-03-13 19:33:41

Et voila, I'm done.
The pull request needs review now.

Franz 2011-03-14 17:55:02

I would dare to say that after heavy review by quy, this is now complete. That means, last call for reviews. Otherwise, I'm going to merge this into core some time tomorrow.

Franz 2011-03-16 12:08:34

Commit 6bfcd8d to fluxbb fluxbb-1.4

#168: Add batch actions for banning, changing and deleting users.

Franz 2011-03-16 12:10:40

  • Status changed from open to fixed.

Pushed now in 6bfcd8d.

adaur 2011-03-16 17:13:21

Why don't you move common.js to /include ?

Nice job btw.

Reines 2011-03-16 17:22:22

The include folder is for files which are included/read by the server (i.e. included/read by PHP). They are files which don't have to be accessible to the web server (and in fact on we have the include folder blocked).

adaur 2011-03-16 17:27:44

In this case, you should move header.php and footer.php to /include.

I still think it is cleaner for the root not to have a js file, but of course you are free to do what you want!

Reines 2011-03-16 17:29:32

Yea I've always wondered why header.php and footer.php aren't in there, but moving them now would break stuff/confuse people for no real good reason.

In 2.0 they will be done away with anyway I imagine.

Franz 2011-03-17 16:13:07

Commit 4549d2b to fluxbb fluxbb-1.4

Disallow changes to own user profile when doing batch actions on the admin users page.

Related to #168.

Franz 2011-03-17 16:20:46

Commit ae0a175 to fluxbb fluxbb-1.4

Disallow moving multiple users to the admin group - for security reasons.

Related to #168.

Franz 2011-03-17 16:24:02

Commit d6a2fb6 to fluxbb fluxbb-1.4

Disallow moving admins to other user groups - again, for security reasons.

Related to #168.

Franz 2011-03-17 16:25:21

Three enhancements: commits 4549d2b, a30a175 and d6a2fb6.

Franz 2011-03-17 22:10:14

I'd be glad about a quick review (especially the language-related changes).

quy 2011-03-18 04:03:16

For 'No move self message', remove 'If you want to demote yourself, please visit your user profile and change your group there.' since this is not possible to do yourself in the user profile.

For 'No ban self message', I would remove 'Who would want that anyway?' It feels like a commentary than information.

Franz 2011-03-18 12:09:25

Fine. Let's be serious then.

Franz 2011-03-18 12:10:34

Commit e792983 to fluxbb fluxbb-1.4

Change some language strings.

Related to #168.

Franz 2011-03-18 21:17:21

Can somebody please check the CSS again, please? I can't see the checkbox column when using that browser...

Franz 2011-03-22 12:59:43

Commit 9927f30 to fluxbb fluxbb-1.4

Remove error messages about moving/deleting/banning oneself.

These cases are already taken care of by other error messages.
Related to #168.