X-Git-Url: http://git.cyclocoop.org/?a=blobdiff_plain;f=includes%2Fspecials%2FSpecialRedirect.php;h=50867dd87916f768798e6ab576cef06abd0c73ae;hb=4356572546b2b4e8eefda9bf10943ba1b12526b9;hp=c1409ffd6fdf474c592914d22b6f5900eabe3ec3;hpb=a6a6c19c794619c24881d2d984dc18ceb3b6419b;p=lhc%2Fweb%2Fwiklou.git diff --git a/includes/specials/SpecialRedirect.php b/includes/specials/SpecialRedirect.php index c1409ffd6f..50867dd879 100644 --- a/includes/specials/SpecialRedirect.php +++ b/includes/specials/SpecialRedirect.php @@ -83,6 +83,11 @@ 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 ) );