if ( !is_null( $params['rights'] ) && count( $params['rights'] ) ) {
$groups = [];
foreach ( $params['rights'] as $r ) {
- $groups = array_merge( $groups, User::getGroupsWithPermission( $r ) );
+ $groups = array_merge( $groups, $this->getPermissionManager()
+ ->getGroupsWithPermission( $r ) );
}
// no group with the given right(s) exists, no need for a query
}
if ( $params['activeusers'] ) {
$data['recentactions'] = (int)$row->recentactions;
- // @todo 'recenteditcount' is set for BC, remove in 1.25
- $data['recenteditcount'] = $data['recentactions'];
}
if ( $fld_registration ) {
$data['registration'] = $row->user_registration ?
}
if ( $fld_rights ) {
- $data['rights'] = User::getGroupPermissions( $groups );
+ $data['rights'] = $this->getPermissionManager()->getGroupPermissions( $groups );
ApiResult::setIndexedTagName( $data['rights'], 'r' );
ApiResult::setArrayType( $data['rights'], 'array' );
}
protected function getExamplesMessages() {
return [
'action=query&list=allusers&aufrom=Y'
- => 'apihelp-query+allusers-example-Y',
+ => 'apihelp-query+allusers-example-y',
];
}