X-Git-Url: https://git.heureux-cyclage.org/?p=lhc%2Fweb%2Fwiklou.git;a=blobdiff_plain;f=includes%2Fuser%2FLocalIdLookup.php;h=4c9099e8b6fdca06c3015826a37c82e260f77d1e;hp=ca3db5b07d505d19038beee9717e9aeb519f28b6;hb=7b4eafda0d986180d20f37f2489b70e8eca00df4;hpb=aac6b26c0bafc81287bb042304f1d346da94dc89 diff --git a/includes/user/LocalIdLookup.php b/includes/user/LocalIdLookup.php index ca3db5b07d..4c9099e8b6 100644 --- a/includes/user/LocalIdLookup.php +++ b/includes/user/LocalIdLookup.php @@ -20,6 +20,8 @@ * @file */ +use MediaWiki\MediaWikiServices; + /** * A CentralIdLookup provider that just uses local IDs. Useful if the wiki * isn't part of a cluster or you're using shared user tables. @@ -69,7 +71,10 @@ class LocalIdLookup extends CentralIdLookup { 'user_id' => array_map( 'intval', array_keys( $idToName ) ), ]; $join = []; - if ( $audience && !$audience->isAllowed( 'hideuser' ) ) { + if ( $audience && !MediaWikiServices::getInstance() + ->getPermissionManager() + ->userHasRight( $audience, 'hideuser' ) + ) { $tables[] = 'ipblocks'; $join['ipblocks'] = [ 'LEFT JOIN', 'ipb_user=user_id' ]; $fields[] = 'ipb_deleted'; @@ -100,7 +105,10 @@ class LocalIdLookup extends CentralIdLookup { 'user_name' => array_map( 'strval', array_keys( $nameToId ) ), ]; $join = []; - if ( $audience && !$audience->isAllowed( 'hideuser' ) ) { + if ( $audience && !MediaWikiServices::getInstance() + ->getPermissionManager() + ->userHasRight( $audience, 'hideuser' ) + ) { $tables[] = 'ipblocks'; $join['ipblocks'] = [ 'LEFT JOIN', 'ipb_user=user_id' ]; $where[] = 'ipb_deleted = 0 OR ipb_deleted IS NULL';