46 private function addDeletedUserFilter() {
50 $this->
addWhere( $utils->getExpression( $this->getDB() ) );
52 $this->
addFields( [
'hu_deleted' =>
'1=0' ] );
55 'hu_deleted' => $utils->getExpression(
58 HideUserUtils::HIDDEN_USERS
74 private function getBlockDetailsForRows( $rows ) {
76 foreach ( $rows as $row ) {
77 $ids[] = (int)$row->user_id;
83 ->newListFromConds( [
'bt_user' => $ids ] );
85 foreach ( $blocks as $block ) {
86 $blocksByUser[$block->getTargetUserIdentity()->getId()][] = $block;
89 foreach ( $blocksByUser as $id => $userBlocks ) {
90 if ( count( $userBlocks ) > 1 ) {
91 $maybeCompositeBlock = CompositeBlock::createFromBlocks( ...$userBlocks );
93 $maybeCompositeBlock = $userBlocks[0];
95 $infoByUser[$id] = $this->getBlockDetails( $maybeCompositeBlock );
108 abstract protected function getDB();
121 abstract protected function addTables( $tables, $alias =
null );
151class_alias( ApiQueryBlockInfoTrait::class,
'ApiQueryBlockInfoTrait' );
trait ApiQueryBlockInfoTrait