Code to link back to member who submitted music?

0
I would like to link artist (and possibly album and song) pages back to the profile of the user who added the content. How would I go about doing this?
Responses (5)
  • Accepted Answer

    Saturday, September 01 2012, 06:27 PM - #Permalink
    0
    I believe perhaps I can use:

    $user =& JFactory::getUser();

    or

    if($user->id != $owner) return "";
    The reply is currently minimized Show
  • Accepted Answer

    Sunday, September 02 2012, 12:57 PM - #Permalink
    0
    not really this, because this will retrieve the current user.
    but if you do this, I think:

    $user =& JFactory::getUser($this->album->user_id);

    echo $user->username ;

    or similar it should work..
    The reply is currently minimized Show
  • Accepted Answer

    Sunday, September 02 2012, 02:30 PM - #Permalink
    0
    Great! As always, thanks for the help, Germi.
    The reply is currently minimized Show
  • Accepted Answer

    Sunday, September 02 2012, 03:22 PM - #Permalink
    0
    For artist pages I did this:

    $user =& JFactory::getUser($this->artist->user_id);
    {
    echo 'More info: username . '/">Contact Me';
    }


    Crap! I keep forgetting we can't post certain code here.
    The reply is currently minimized Show
  • Accepted Answer

    michael
    michael
    Offline
    Monday, September 29 2014, 01:19 AM - #Permalink
    0
    Hello,
    I needed my users name to link back to their cb profile.
    so i paste the code you noted above

    $user =& JFactory::getUser($this->album->user_id);

    echo $user->username ;

    this is possible. thanks
    would it be possible to tell me the correct path and file to paste that code so that i can link my users name to their profile?
    thanks for any help
    The reply is currently minimized Show
Your Reply