Skip to:
Content
Pages
Categories
Search
Top
Bottom

Create a link with the user’s username in it

  • @sean_a

    Member

    Is there a way for me to create a link on one of my “posts” from the front end that has a link to a part of my site that requires the reader’s uisername’s link in it?

    So I want to say for example “Please click here to go back to your profile” on my page’s content.
    I want it to point to “www.domain.com/username”. not my username, but the reader’s username.

    Is there a way to do it using a combination of and get_currentuserinfo(); ?

Viewing 2 replies - 1 through 2 (of 2 total)
  • @abysshorror

    Member

    Of the top of my head, start by getting the id of the user that’s browsing:

    `bp_loggedin_user_id()`

    @dcavins

    Keymaster

    Try `echo bp_core_get_userlink( bp_loggedin_user_id() );` like Buddypress’s standard login form uses in the sidebar.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Create a link with the user’s username in it’ is closed to new replies.
Skip to toolbar