}
}
- if ( $params['hidename'] && !$user->isAllowed( 'hideuser' ) ) {
+ if ( $params['hidename'] &&
+ !$this->getPermissionManager()->userHasRight( $user, 'hideuser' ) ) {
$this->dieWithError( 'apierror-canthide' );
}
if ( $params['noemail'] && !SpecialBlock::canBlockEmail( $user ) ) {
}
list( $target, /*...*/ ) = SpecialBlock::getTargetAndType( $params['user'] );
+ $res = [];
$res['user'] = $params['user'];
$res['userID'] = $target instanceof User ? $target->getId() : 0;