Skip to:
Content
Pages
Categories
Search
Top
Bottom

Activity page tag options


  • inderpreet2018
    Participant

    @inderpreet2018

    Hi,

    When I tag someone on my activity page, it shows denied users also
    2019-03-23_1210

    How can I remove denied/pending users from tag options?

    Thanks in advance.

Viewing 5 replies - 1 through 5 (of 5 total)

  • Venutius
    Moderator

    @venutius

    When you say a denied user, what do you mean? BP standalone does not have a feature such as this so it my be that you have a plugin adding this feature and if so I’d ask that plugins developer to filter the mentions list for activity.


    inderpreet2018
    Participant

    @inderpreet2018

    Hi,

    I am using memberpress plugin for members login/profile with buddypress. And I am using New User approved plugin to approve members. So there are a number of denied users/members, which I don’t want to see in tagging option, as I described above.


    shanebp
    Moderator

    @shanebp

    You’ll need to use this filter:
    apply_filters( 'bp_core_get_suggestions', $retval, $args );

    For more info, find that filter in this file:
    ...wp-content\plugins\buddypress\bp-core\bp-core-functions.php

    How you retrieve the ‘denied’ users will depend on how they are handled by the other code or plugins.
    If you do not know how to get an array of the denied user ids, you should ask the creators of that other code or plugins.


    inderpreet2018
    Participant

    @inderpreet2018

    Can you help me little more?
    how I used that filter to remove denied user to mention, denied status is saved in usermeta.

    I am some code snippet getting users whose role is subscriber and status is denied/pending to exclude from members directory, members count
    $role = ‘subscriber’;// change to the role to be excluded.
    $user_ids = get_users(array( ‘role’ => $role, ‘fields’ => ‘ID’, ‘meta_query’ => array(‘relation’ => ‘OR’, array(‘key’ => ‘pw_user_status’, ‘value’ => ‘pending’), array(‘key’ => ‘pw_user_status’, ‘value’ => ‘denied’)) ) );
    2019-03-28_1300

    Is that way I used above filter?


    inderpreet2018
    Participant

    @inderpreet2018

    ??

Viewing 5 replies - 1 through 5 (of 5 total)
  • You must be logged in to reply to this topic.
Skip to toolbar