$status = self::checkUnblockSelf( $this->target, $user );
if ( $status !== true ) {
throw new ErrorPageError( 'badaccess', $status );
$status = self::checkUnblockSelf( $this->target, $user );
if ( $status !== true ) {
throw new ErrorPageError( 'badaccess', $status );
if ( !$block->mHideName || $this->getUser()->isAllowed( 'hideuser' ) ) {
$fields['Reason']['default'] = $block->mReason;
} else {
if ( !$block->mHideName || $this->getUser()->isAllowed( 'hideuser' ) ) {
$fields['Reason']['default'] = $block->mReason;
} else {
$blockNotConfirmed = !$data['Confirm'] || ( array_key_exists( 'PreviousTarget', $data )
&& $data['PreviousTarget'] !== $target );
$blockNotConfirmed = !$data['Confirm'] || ( array_key_exists( 'PreviousTarget', $data )
&& $data['PreviousTarget'] !== $target );
$reblockNotAllowed = ( array_key_exists( 'Reblock', $data ) && !$data['Reblock'] );
# Show form unless the user is already aware of this...
$reblockNotAllowed = ( array_key_exists( 'Reblock', $data ) && !$data['Reblock'] );
# Show form unless the user is already aware of this...
$logEntry->setComment( $data['Reason'][0] );
$logEntry->setPerformer( $performer );
$logEntry->setParameters( $logParams );
$logEntry->setComment( $data['Reason'][0] );
$logEntry->setPerformer( $performer );
$logEntry->setParameters( $logParams );
$blockIds = array_merge( [ $status['id'] ], $status['autoIds'] );
$logEntry->setRelations( [ 'ipb_id' => $blockIds ] );
$logId = $logEntry->insert();
$blockIds = array_merge( [ $status['id'] ], $status['autoIds'] );
$logEntry->setRelations( [ 'ipb_id' => $blockIds ] );
$logId = $logEntry->insert();
* others, and probably shouldn't be able to unblock themselves
* either.
* @param User|int|string $user
* others, and probably shouldn't be able to unblock themselves
* either.
* @param User|int|string $user