Hello. Can you advise what the PHP code would be to get the value of the "GENDER" and "BIRTHDAY" profile fields of the logged in user?
Thanks!
Thanks!
<?php
$db =& JFactory::getDBO();
$user = JFactory::getUser();
$loggedin = $user->get('id');
if ($loggedin == 0) {
echo 'Log in to test this';
} else {
// Current user data
$userData = ES::user($loggedin);
// Pass in gender unique key, you can found this from your workflow
$fieldData= $userData->getFieldValue('GENDER');
echo $fieldData;
$fieldData= $userData->getFieldValue('BIRTHDAY');
echo $fieldData;
}
?>