Skip to:
Content
Pages
Categories
Search
Top
Bottom

Forum Replies Created

Viewing 1 replies (of 1 total)

  • Mohamed Elamine
    Participant

    @mewebpro

    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' );
Viewing 1 replies (of 1 total)
Skip to toolbar