// Clear cache for the affected users (bug 40340)
if ( $affected > 0 ) {
// XXX: This also invalidates cache of unaffected users that
// were in the new group and not in the group.
$res = $dbw->select( 'user_groups', 'ug_user',
// Clear cache for the affected users (bug 40340)
if ( $affected > 0 ) {
// XXX: This also invalidates cache of unaffected users that
// were in the new group and not in the group.
$res = $dbw->select( 'user_groups', 'ug_user',