Skip to:
Content
Pages
Categories
Search
Top
Bottom

Exclude 'pending' users in alphabetical listing

  • @travis182

    Participant

    First of all, great plugin!
    I’m using buddypress to show verified (not pending) WordPress users / members. If the member loop is sorted on ‘last activity’ or something similar, everything is fine, because pending wordpress users have never logged in before and don’t appear in the listing.
    When I sort on ‘alphabetical’, the list also shows all pending users. How can I exclude all pending users in the alphabetical sort option?
    Ideas?

    Thanx!

Viewing 1 replies (of 1 total)
  • @travis182

    Participant

    I solved the issue using changing the members-loop, adding:

    <?php while ( bp_members() ) : bp_the_member();
    $user = new WP_User( bp_get_member_user_id() );
    if ( $user->roles[0] != 'pending' ) :
    ?>

    I couldn’t get a solution trying to change the alphabetical sorting, but with this fix, I didn’t edit the sorting itself, but excluded the pending role from the members-loop altogether.

Viewing 1 replies (of 1 total)
  • The topic ‘Exclude 'pending' users in alphabetical listing’ is closed to new replies.
Skip to toolbar