Each user within JomSocial is represented by a special object called CUser. CUser inherit all JUser object properties and added a couple new functionality.

To retrieve user object

{code}// Return user with the given id
$user =& CFactory::getUser($userId);


// Return current logged-in user. If no one is logged-in, it will
// return a visitor object
$user =& CFactory::getUser();{/code}

To retrieve any user-specific information from custom field

{code}$user =& CFactory::getUser($userId);
$data = $user->getInfo('FIELD_CODE');{/code}

Join 180,000 websites creating Amazing communities

JomSocial is the most complete, easy-to-use addon that turns Joomla CMS into a
full -fledged, social networking site

TRY NOW BUY NOW