Skip to:
Content

BuddyPress.org

Ticket #2319: group_meta.diff

File group_meta.diff, 771 bytes (added by rvenable, 10 years ago)
  • bp-groups/bp-groups-classes.php

     
    128128                $user_ids = implode( ',', (array)$user_ids );
    129129
    130130                /* Modify group count usermeta for members */
    131                 $wpdb->query( $wpdb->prepare( "UPDATE {$bp->groups->table_name_groupmeta} SET meta_value = meta_value - 1 WHERE meta_key = 'total_group_count' AND user_id IN ( {$user_ids} )" ) );
     131                $wpdb->query( $wpdb->prepare( "UPDATE {$wpdb->usermeta} SET meta_value = meta_value - 1 WHERE meta_key = 'total_group_count' AND user_id IN ( {$user_ids} )" ) );
    132132
    133133                /* Now delete all group member entries */
    134134                BP_Groups_Member::delete_all( $this->id );