From: Sam Reed Date: Sun, 20 Jun 2010 17:30:23 +0000 (+0000) Subject: Followup r68157 and r68161 per Bryans comment (anons aren't in the group user) X-Git-Tag: 1.31.0-rc.0~36441 X-Git-Url: http://git.cyclocoop.org/%7B%24www_url%7Dadmin/compta/pie.php?a=commitdiff_plain;h=232cabd9f8ce627e4da21f2471cbf70c8d6df32d;p=lhc%2Fweb%2Fwiklou.git Followup r68157 and r68161 per Bryans comment (anons aren't in the group user) --- diff --git a/includes/api/ApiQueryUsers.php b/includes/api/ApiQueryUsers.php index 46aba7f59e..4301f2b153 100644 --- a/includes/api/ApiQueryUsers.php +++ b/includes/api/ApiQueryUsers.php @@ -225,7 +225,13 @@ if ( !defined( 'MEDIAWIKI' ) ) { * @return array */ public static function getAutoGroups( $user ) { - return array_merge( array( '*', 'user' ), Autopromote::getAutopromoteGroups( $user ) ); + $groups = array( '*' ); + + if ( !$user->isAnon() ) { + $groups[] = 'user'; + } + + return array_merge( $groups, Autopromote::getAutopromoteGroups( $user ) ); } public function getAllowedParams() {