r68331 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r68330‎ | r68331 | r68332 >
Date:17:30, 20 June 2010
Author:reedy
Status:ok
Tags:
Comment:
Followup r68157 and r68161 per Bryans comment (anons aren't in the group user)
Modified paths:
  • /trunk/phase3/includes/api/ApiQueryUsers.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/api/ApiQueryUsers.php
@@ -225,7 +225,13 @@
226226 * @return array
227227 */
228228 public static function getAutoGroups( $user ) {
229 - return array_merge( array( '*', 'user' ), Autopromote::getAutopromoteGroups( $user ) );
 229+ $groups = array( '*' );
 230+
 231+ if ( !$user->isAnon() ) {
 232+ $groups[] = 'user';
 233+ }
 234+
 235+ return array_merge( $groups, Autopromote::getAutopromoteGroups( $user ) );
230236 }
231237
232238 public function getAllowedParams() {

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r68157Minor followup to r68156, add "user" as implicit group...reedy08:00, 17 June 2010
r68161Followup to r68157: simplify ApiQueryUsers::getAutoGroups()catrope09:39, 17 June 2010

Status & tagging log