+ if ( $valid && $this->getPermissionManager()->isBlockedFrom( $user, $valid->getTitle() ) ) {
+ $idResult['status'] = 'error';
+ // @phan-suppress-next-line PhanTypeMismatchArgument
+ $idResult += $this->getErrorFormatter()->formatMessage( ApiMessage::create(
+ 'apierror-blocked',
+ 'blocked',
+ [ 'blockinfo' => $this->getBlockDetails( $user->getBlock() ) ]
+ ) );
+ return $idResult;
+ }