Skip to:
Content
Pages
Categories
Search
Top
Bottom

Using BP function bp_has_members( ‘include=$ARRAY’)

  • @lethalgj

    Member

    I can’t get this function to work with an array or list separated by a comma is there somthing i am doing wrong? When i pass a value to it e.g.(1) then it works but is no use to me.

    For this example i have added data to the variable $users.

    $users[] = 1;

    $usersImploded = implode(“,”, $users);

    if ( bp_has_members( ‘include=$usersImploded’ ) ) //Doesnt work using $users rather than $usersImploded either

Viewing 3 replies - 1 through 3 (of 3 total)
  • @lethalgj

    Member

    Ahh i seeee, It accepts no variable for some reason. I tried $number (Assigned: $number = 1;) and it still didn’t work. Any idea’s what i put after ‘include= guys?

    @lethalgj

    Member

    This is the link to the actual function located in bp-members-functions.php

    http://pastebin.com/0YyptMf4

    @lethalgj

    Member

    RESOLVED!! Had to use if ( bp_has_members( array(‘include’ => $usersImploded))) instead.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Using BP function bp_has_members( ‘include=$ARRAY’)’ is closed to new replies.
Skip to toolbar