Skip to:
Content
Pages
Categories
Search
Top
Bottom

How to create custom links\\get_userurl


  • Jeremy Winter
    Participant

    @jjwinter

    Prior to version 1.0 this link would pull the current logged in users url and direct them to their public profile.

    a href=\"<?php global $bp; echo bp_core_get_userurl($bp[\'loggedin_userid\']) ?>profile/public\"

    Unfortunately now this code doesn\’t work. Does anyone know how to adapt this link to version 1.0+?

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

  • elody
    Participant

    @elody

    I would loooove to get the answer too !

    Thx to help us …


    John James Jacoby
    Keymaster

    @johnjamesjacoby

    $user_id = the id of the person you want to get;
    echo bp_core_get_userurl($user_id);

    There is also bp_core_get_userlink which works in similar fashion but has more parameters. Open bp-core.php and check it out, it’s fully documented.


    Jeremy Winter
    Participant

    @jjwinter

    I have figured out the correct way to display the logged in user id.

    <a href="<?php global $bp; echo bp_core_get_userurl($bp->loggedin_user->id); ?>activity/my-friends">Your Friends Activity</a>

    instead of

    ($bp[’loggedin_userid’])

    we should be using

    ($bp->loggedin_user->id);

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘How to create custom links\\get_userurl’ is closed to new replies.
Skip to toolbar