Add new UsersPagerDoBatchLookups hook to allow for extensions to modify UsersPager...
authorJack Phoenix <jack@countervandalism.net>
Wed, 24 Aug 2016 14:00:22 +0000 (17:00 +0300)
committerJack Phoenix <jack@countervandalism.net>
Thu, 25 Aug 2016 19:24:21 +0000 (22:24 +0300)
commit271c418765a8b4ee2219487246822b46eb3eb023
tree870b83d3716bac995948e06c06350b1260e9c292
parentb3108317000fd365020fb3b516fd218977d85f60
Add new UsersPagerDoBatchLookups hook to allow for extensions to modify UsersPager::doBatchLookup()'s rigid behavior

Currently UsersPager::doBatchLookup() assumes that group data comes *only*
from one place, the (local) user_groups DB table. But this isn't correct
when an extension like [[mw:Extension:GlobalUserrights]] is installed.
With the current master version of the GlobalUserrights ext. installed
under MW 1.27, only the *local* groups are shown on Special:ListUsers.
Even if you have a global group called 'staff' and you go to the
[[Special:ListUsers/staff]] page, it *will* display the correct list of
users, but the group data in parentheses is wrong; it's either 1) missing
(if the user is only a member of a global group but not any local groups)
or 2) incorrect in that it omits global group membership(s) entirely.

With this hook, an extension such as GlobalUserrights is able to query an
additional source of user group data (such as the global_user_groups table
in $wgSharedDB in the case of the GlobalUserrights ext.) and have this
data stored in the cache to ensure that global group data shows up as it
should.

Change-Id: Ied2c0f2d5738cf96a66a9672182345d630285639
docs/hooks.txt
includes/specials/pagers/UsersPager.php