Index: trunk/phase3/includes/api/ApiQueryAllUsers.php |
— | — | @@ -225,14 +225,14 @@ |
226 | 226 | $result->setIndexedTagName( $lastUserData['groups'], 'g' ); |
227 | 227 | } |
228 | 228 | |
229 | | - if ( $fld_rights && !is_null( $row->ug_group2 ) ) { |
230 | | - if ( !isset( $lastUserData['rights'] ) ) { |
231 | | - $lastUserData['rights'] = User::getGroupPermissions( User::getImplicitGroups() ); |
| 229 | + if ( $fld_groups ) { |
| 230 | + if ( !isset( $lastUserData['groups'] ) ) { |
| 231 | + $lastUserData['groups'] = ApiQueryUsers::getAutoGroups( User::newFromName( $lastUser ) ); |
232 | 232 | } |
233 | | - |
234 | | - $lastUserData['rights'] = array_unique( array_merge( $lastUserData['rights'], |
235 | | - User::getGroupPermissions( array( $row->ug_group2 ) ) ) ); |
236 | | - $result->setIndexedTagName( $lastUserData['rights'], 'r' ); |
| 233 | + if ( !is_null( $row->ug_group2 ) ) { |
| 234 | + $lastUserData['groups'][] = $row->ug_group2; |
| 235 | + } |
| 236 | + $result->setIndexedTagName( $lastUserData['groups'], 'g' ); |
237 | 237 | } |
238 | 238 | } |
239 | 239 | |