From 232cabd9f8ce627e4da21f2471cbf70c8d6df32d Mon Sep 17 00:00:00 2001 From: Sam Reed Date: Sun, 20 Jun 2010 17:30:23 +0000 Subject: [PATCH] Followup r68157 and r68161 per Bryans comment (anons aren't in the group user) --- includes/api/ApiQueryUsers.php | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) 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() { -- 2.20.1