Index: trunk/phase3/docs/hooks.txt |
— | — | @@ -1206,10 +1206,6 @@ |
1207 | 1207 | $item: HTML to be returned. Will be wrapped in <li></li> after the hook finishes |
1208 | 1208 | $row: Database row object |
1209 | 1209 | |
1210 | | -'SpecialListusersGetGroups': called right before the end of UsersPager::getGroups() |
1211 | | -&$groups: array of groups the user is in |
1212 | | -$uid: User identifier |
1213 | | - |
1214 | 1210 | 'SpecialListusersHeader': called before closing the <fieldset> in UsersPager::getPageHeader() |
1215 | 1211 | $pager: The UsersPager instance |
1216 | 1212 | $out: The header HTML |
Index: trunk/phase3/includes/specials/SpecialListusers.php |
— | — | @@ -215,15 +215,8 @@ |
216 | 216 | * @return array |
217 | 217 | */ |
218 | 218 | protected static function getGroups( $uid ) { |
219 | | - $dbr = wfGetDB( DB_SLAVE ); |
220 | | - $groups = array(); |
221 | | - $res = $dbr->select( 'user_groups', 'ug_group', array( 'ug_user' => $uid ), __METHOD__ ); |
222 | | - if( $res && $dbr->numRows( $res ) > 0 ) { |
223 | | - while( $row = $dbr->fetchObject( $res ) ) |
224 | | - $groups[] = $row->ug_group; |
225 | | - $dbr->freeResult( $res ); |
226 | | - } |
227 | | - wfRunHooks( 'SpecialListusersGetGroups', array( &$groups, $uid ) ); |
| 219 | + $user = User::newFromId( $uid ); |
| 220 | + $groups = array_diff( $user->getEffectiveGroups(), $user->getImplicitGroups() ); |
228 | 221 | return $groups; |
229 | 222 | } |
230 | 223 | |
Index: trunk/phase3/RELEASE-NOTES |
— | — | @@ -216,8 +216,6 @@ |
217 | 217 | * Moved password reset form from Special:Preferences to Special:ResetPass |
218 | 218 | * Added Special:ChangePassword as a special page alias for Special:ResetPass |
219 | 219 | * Added complimentary function for addHandler() called removeHandler() for removing events |
220 | | -* Added hook SpecialListusersGetGroups which is called right before the end of UsersPager::getGroups() |
221 | | - and can be used by extensions to add to the user's groups. |
222 | 220 | |
223 | 221 | === Bug fixes in 1.14 === |
224 | 222 | |