* @return array
*/
function getQueryInfo() {
- $dbr = wfGetDB( DB_SLAVE );
+ $dbr = wfGetDB( DB_REPLICA );
$conds = [];
// Don't show hidden names
}
// Lookup groups for all the users
- $dbr = wfGetDB( DB_SLAVE );
+ $dbr = wfGetDB( DB_REPLICA );
$groupRes = $dbr->select(
'user_groups',
[ 'ug_user', 'ug_group' ],
$cache[intval( $row->ug_user )][] = $row->ug_group;
$groups[$row->ug_group] = true;
}
+
+ // Give extensions a chance to add things like global user group data
+ // into the cache array to ensure proper output later on
+ Hooks::run( 'UsersPagerDoBatchLookups', [ $dbr, $userIds, &$cache, &$groups ] );
+
$this->userGroupCache = $cache;
// Add page of groups to link batch