32 private function addDeletedUserFilter() {
36 $this->
addWhere( $utils->getExpression( $this->getDB() ) );
38 $this->
addFields( [
'hu_deleted' =>
'1=0' ] );
41 'hu_deleted' => $utils->getExpression(
44 HideUserUtils::HIDDEN_USERS
60 private function getBlockDetailsForRows( $rows ) {
62 foreach ( $rows as $row ) {
63 $ids[] = (int)$row->user_id;
69 ->newListFromConds( [
'bt_user' => $ids ] );
71 foreach ( $blocks as $block ) {
72 $blocksByUser[$block->getTargetUserIdentity()->getId()][] = $block;
75 foreach ( $blocksByUser as $id => $userBlocks ) {
76 if ( count( $userBlocks ) > 1 ) {
77 $maybeCompositeBlock = CompositeBlock::createFromBlocks( ...$userBlocks );
79 $maybeCompositeBlock = $userBlocks[0];
81 $infoByUser[$id] = $this->getBlockDetails( $maybeCompositeBlock );
94 abstract protected function getDB();
107 abstract protected function addTables( $tables, $alias =
null );
137class_alias( ApiQueryBlockInfoTrait::class,
'ApiQueryBlockInfoTrait' );
trait ApiQueryBlockInfoTrait