Ahh.. You didn't mention before that it's the users without the URL set. Update the code like:But the error is still there on profiles that dont have a URL in contact details...
$cuser = CFactory::getUser();
$data = $cuser->getInfo('FIELD_XXXX');
if ($data != "")
echo "{SCFacebookLike href=" . $data . "}";
else
echo "{SCFacebookLike href=https://facebook.com/sourcecoast}";
?>
CFactory::getUser();
CFactory::getUser($id);
nothing change... Should I ask Jomsocial support ?mel wrote: I just noticed that you're calling:
CFactory::getUser();
This returns the currently logged in user. I believe that you should be able to pass in the ID of the user whose profile you're looking at, such as the following:CFactory::getUser($id);
However, you'll have to figure out how to get the ID of the user you're viewing.
Join our newsletter to get alerts for Joomla releases, tips and tricks and extension updates.