I am using Joomla! v3.3.3 and I have just enabled the "User-Profile" component.

How can I access and/or echo the "User-Profile" component data via PHP, such as: address1, city, website, etc?

I know how to access/echo standard user data ex. <?php echo $user->username; ?> but how can I access and echo out the "User-Profile" component's data?

Thanks in advance for the help!


For anyone else with this question, you can find the answer here: How to display user profile information?

As described in the aforementioned post, the short answer is as follows:

To access the User Profile Data

jimport( 'joomla.user.helper' ); 
$user = JFactory::getUser();
$userId = $user->id; 
$userProfile = JUserHelper::getProfile( $userId );

echo "Main Address: " . $userProfile->profile['address1']

Not the answer you're looking for? Browse other questions tagged or ask your own question.