Skip to:
Content
Pages
Categories
Search
Top
Bottom

Re: Can’t delete user

@lph2005

Participant

I can’t help much (hopefully others will chime in here) but the error comes from this function:

function delete_all_for_user( $user_id ) {
global $wpdb, $bp;

// Get all the group ids for the current user’s groups and update counts
$group_ids = $this->get_group_ids( $user_id );
foreach ( $group_ids->groups as $group_id ) {
groups_update_groupmeta( $group_id, ‘total_member_count’, groups_get_total_member_count( $group_id ) – 1 );
}

return $wpdb->query( $wpdb->prepare( “DELETE FROM {$bp->groups->table_name_members} WHERE user_id = %d”, $user_id ) );
}

Skip to toolbar