Using Jomsocial functions in outside of Jomsocial


/ 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. // Return current user
  5. $user =& CFactory::getUser();
  6. // Return user with given id
  7. $user =& CFactory::getUser($userId);

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.