Hello, Guest.

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.


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 any user-specific information from custom field

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

Docs Navigation

JomSocial Video Testimonial Contest. Top 5 best videos wins iPod Nano 4G.

Slashes & Dots Sdn. Bhd.
MALAYSIA OFFICE
No 1-7, Signature Office,
The Boulevard Mid Valley City,
Lingkaran Syed Putra,
59200 Kuala Lumpur, Malaysia.
U.S. OFFICE
251 West Central Avenue #146,
Springboro, Ohio 45066, U.S.A.

Tel: +60 (3) 2282-1997
Fax: +60 (3) 2283-1997
E-mail:
Copyright © 2007 - 2009 JomSocial.com. All rights reserved.
JomSocial is made for Joomla!
JomSocial Community Count

636 users currently online | 84564 forum posts