X-Git-Url: http://git.cyclocoop.org/%7B%24www_url%7Dadmin/compta/exercices/modifier.php?a=blobdiff_plain;f=includes%2Fspecials%2FSpecialRedirect.php;h=82d8b73b1f51d59672179883f509c02950295347;hb=e75daacd8e210b5699120c00a1fa0e0548faf967;hp=c1409ffd6fdf474c592914d22b6f5900eabe3ec3;hpb=de881f4241945f7a7f1aba2c6e072d9ddaf82da3;p=lhc%2Fweb%2Fwiklou.git 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 + ] ); } /**