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 ) );
}
Anyway, it looks like $this is being used improperly.
$group_ids = $this->get_group_ids( $user_id );
http://php.syntaxerrors.info/index.php?title=Using_$this_when_not_in_object_context
It’s a php4 versus php5 issue … but … hopefully a programmer can help here.
We have a fix in the branch for this, which will be BP 1.2.5.1 very soon. Look at https://trac.buddypress.org/changeset/3113
Thanks both @LPH2005 and @Paul Gibbs.
By the way, I CAN delete the user if I go the dashboard and go down to the WPMU ‘users’ section no problem. A little bit more work, but now that I’m getting the odd spammer signing up, it’s essential.