Link to Jomsocal User Profile Page

/ Published in: PHP
Save to your folder(s)

Copy this code and paste it in your HTML
  1. // Include Jomsocial core
  2. $jspath = JPATH_ROOT.DS.'components'.DS.'com_community';
  3. include_once($jspath.DS.'libraries'.DS.'core.php');
  4. // Get CUser object
  5. $link = CRoute::_('index.php?option=com_community&view=profile&userid='.$userid);
  6. echo '<a href="/.$link.">User profile</a>';

Report this snippet


RSS Icon Subscribe to comments

You need to login to post a comment.