Followup r68157 and r68161 per Bryans comment (anons aren't in the group user)
authorSam Reed <reedy@users.mediawiki.org>
Sun, 20 Jun 2010 17:30:23 +0000 (17:30 +0000)
committerSam Reed <reedy@users.mediawiki.org>
Sun, 20 Jun 2010 17:30:23 +0000 (17:30 +0000)
includes/api/ApiQueryUsers.php

index 46aba7f..4301f2b 100644 (file)
@@ -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() {