Merge "deferred: make DeferredUpdates::attemptUpdate() use callback owners for $fname...
[lhc/web/wiklou.git] / includes / api / ApiBlock.php
index 4801267..2c1564e 100644 (file)
@@ -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 ) ) {