Replace usages of deprecated User::isAllowed. Step 2.
[lhc/web/wiklou.git] / includes / specials / pagers / UsersPager.php
index ba078e9..ee0ac00 100644 (file)
@@ -23,6 +23,8 @@
  * @ingroup Pager
  */
 
+use MediaWiki\MediaWikiServices;
+
 /**
  * This class is used to get a list of user. The ones with specials
  * rights (sysop, bureaucrat, developer) will have them displayed
@@ -123,7 +125,10 @@ class UsersPager extends AlphabeticPager {
                $conds = [];
 
                // Don't show hidden names
-               if ( !$this->getUser()->isAllowed( 'hideuser' ) ) {
+               if ( !MediaWikiServices::getInstance()
+                               ->getPermissionManager()
+                               ->userHasRight( $this->getUser(), 'hideuser' )
+               ) {
                        $conds[] = 'ipb_deleted IS NULL OR ipb_deleted = 0';
                }