X-Git-Url: http://git.heureux-cyclage.org/?a=blobdiff_plain;f=includes%2Fapi%2FApiBlock.php;h=2c1564e0857f3c2a234c0f057825c2c71aff0236;hb=529fc12d2ad2032337594389448fdb5b55802830;hp=480126760e137142984e09da1170673e96689d34;hpb=701b642fdc55de095e050cc56d65c61225473a06;p=lhc%2Fweb%2Fwiklou.git diff --git a/includes/api/ApiBlock.php b/includes/api/ApiBlock.php index 480126760e..2c1564e085 100644 --- a/includes/api/ApiBlock.php +++ b/includes/api/ApiBlock.php @@ -98,7 +98,8 @@ class ApiBlock extends ApiBase { } } - if ( $params['hidename'] && !$user->isAllowed( 'hideuser' ) ) { + if ( $params['hidename'] && + !$this->getPermissionManager()->userHasRight( $user, 'hideuser' ) ) { $this->dieWithError( 'apierror-canthide' ); } if ( $params['noemail'] && !SpecialBlock::canBlockEmail( $user ) ) {