Get User Attributes
Permalink
Ok for real this time :) According to the API documentation you are supposed to be able to use the Userinfo object to obtain user attributes. I've used it to fetch user attributes but I see nothin in the manner of fetching them back.. I've var_dumped the userinfo object and the user object to try and obtain the custom attributes (birth_date, and any other custom attribute). Am I just blind here and missing something or is the API missing something here? I notice that page/colllection object contains methods to get attribs but the User* objects don't seem too?
If I am being plainly blind here someone please correct me :)
thanks
If I am being plainly blind here someone please correct me :)
thanks
check the code of userinfo.php (concrete/models)
there's a call like this "public function __call($nm, $a)"
if it starts with getUser c5 executes a db call even if there's not a method available for this.
this is a very neat php feature to create dynamic stuff..
var_dump, print_r etc. won't work because of this..
Just add your attribute after "getUser" and that's it