@mewebpro
8 years, 3 months ago
We have same problem, bp_members_pagination_count() not exclude spam users, I created this code to fix (should add it to bp-custom.php) :
function exclude_spam_users( $retval ) { global $wpdb; $sql = "SELECT ID FROM {$wpdb->users} WHERE user_status != 0"; $exclude_spam_users = $wpdb->get_col( $sql ); if (!empty( $exclude_spam_users )) { $retval['exclude'] = implode( ',', wp_parse_id_list( $exclude_spam_users ) ); } return $retval; } add_filter( 'bp_before_has_members_parse_args', 'exclude_spam_users' );