Skip to:
Content
Pages
Categories
Search
Top
Bottom

bp_group_member_id as parameter value


  • cyberthread
    Member

    @cyberthread

    I’m sure what I am trying to do is relatively easy, but I am stuck after multiple hours of experimentation. I think I am essentially having a PHP syntax problem (I am a PHP noob).

    What I would like to be able to do, conceptually, is something like this:

    bp_group_member_id() is getting the member ID properly when used alone. My code works if I use an actual number instead of the function.

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

  • cyberthread
    Member

    @cyberthread

    I just realized that the example of what I want disappeared in the process of posting.

    Conceptually, this is what I want:

    bp_has_profile(bp_group_member_id())


    cyberthread
    Member

    @cyberthread

    This is what I came up with (it works), but I am not sure it is efficient.

    $profileParemeter = “user_id=”;
    ob_start();
    bp_group_member_id();
    $memberId = ob_get_clean();
    $finalParemeter =$profileParemeter.$memberId;

    if ( bp_has_profile($finalParemeter) ) :

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘bp_group_member_id as parameter value’ is closed to new replies.
Skip to toolbar