Pulling my hair out to get the syntax down in a hidden field to pass some profile variables from easy profile. Assuming a user is logged in, I want to be able (in this example) pass the data from the profile field "stuff" in a hidden filed based on the userid. Nothing I have tried works, this is the latest attempt, but only passes the userid, not the contents of "stuff" for that user
Any help GREATLY appreciated!
//<code>
$user = JFactory::getUser();
return $user->get('id');
$db = JFactory::getDbo();
$db->setQuery("SELECT t86jd_jsn_users.stuff FROM t86jd_jsn_users LEFT JOIN t86jd_users ON t86jd_jsn_users.id=t86jd_users.id WHERE t86jd_users.id=$user"
return $db->loadResult();
//</code>