- if ( $pUser->isBlocked() && !$pUser->isAllowed( 'userrights' ) ) {
- $this->dieBlocked( $pUser->getBlock() );
+ if ( !$this->getPermissionManager()->userHasRight( $pUser, 'userrights' ) ) {
+ $block = $pUser->getBlock();
+ if ( $block && $block->isSitewide() ) {
+ $this->dieBlocked( $block );
+ }