SEARCH DOCS HERE
Custom Search Control
Web |
User Object
Each user within JomSocial is represented by a special object called CUser. CUser inherit all JUser object properties and added a couple new functionality.
Contents |
To retrieve user object
// 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();
To retrieve current user status
$user = CFactory::getUser($userId); $status = $user->getStatus();
To retrieve any user avatar uri
$user = CFactory::getUser($userId); $thumbAvatar = $user->getThumbAvatar(); $largeAvatar = $user->getAvatar();
To retrieve any user-specific information from custom field
$user = CFactory::getUser($userId); $data = $user->getInfo('FIELD_CODE');

