X-Git-Url: http://git.heureux-cyclage.org/?p=lhc%2Fweb%2Fwiklou.git;a=blobdiff_plain;f=includes%2Fspecials%2FSpecialRedirect.php;h=82d8b73b1f51d59672179883f509c02950295347;hp=c1409ffd6fdf474c592914d22b6f5900eabe3ec3;hb=02f35caa16fa574bb36a1d22eea62c3b250de235;hpb=a3b4288eacd34869b13f59782b73c9ddb75e3523 diff --git a/includes/specials/SpecialRedirect.php b/includes/specials/SpecialRedirect.php index c1409ffd6f..82d8b73b1f 100644 --- a/includes/specials/SpecialRedirect.php +++ b/includes/specials/SpecialRedirect.php @@ -83,9 +83,16 @@ class SpecialRedirect extends FormSpecialPage { // Message: redirect-not-exists return Status::newFatal( $this->getMessagePrefix() . '-not-exists' ); } + if ( $user->isHidden() && !MediaWikiServices::getInstance()->getPermissionManager() + ->userHasRight( $this->getUser(), 'hideuser' ) + ) { + throw new PermissionsError( null, [ 'badaccess-group0' ] ); + } $userpage = Title::makeTitle( NS_USER, $username ); - return Status::newGood( $userpage->getFullURL( '', false, PROTO_CURRENT ) ); + return Status::newGood( [ + $userpage->getFullURL( '', false, PROTO_CURRENT ), 302 + ] ); } /**