/**
* Gets the user profile information
*
* @param integer $userId The id of the user.
*
* @return object
*
* @since 1.7.0
*/
public static function getProfile($userId = 0)
{
if ($userId == 0) {
$user = Factory::getUser();
$userId = $user->id;
}
// Get the dispatcher and load the user's plugins.
PluginHelper::importPlugin('user');
$data = new CMSObject();
$data->id = $userId;
// Trigger the data preparation event.
Factory::getApplication()->triggerEvent('onContentPrepareData', array('com_users.profile', &$data));
return $data;
}