Skip to:
Content
Pages
Categories
Search
Top
Bottom

Exclude certain users’ activity based on their email ids


  • Jay
    Participant

    @jaytfl

    Hello Team,

    I would like to exclude some of the users based on their email or domain name.

    I have tried using below code but it isn’t working.

    
    function add_excluded_type( $where_conditions, $r, $select_sql, $from_sql, $join_sql ) {
    
        $where_conditions[]='user_email NOT LIKE "%@gmail.com"';
    
       return $where_conditions;
    }
    
    add_filter( 'bp_activity_get_where_conditions', 'add_excluded_type', 10, 5 );
  • You must be logged in to reply to this topic.
Skip to toolbar