It is not a question; I write so that others can do it and share their solutionswant to the problem. Let's suppose that we have added a field for the genre and another field forknow how they get the values of custom user about. What we want is to show that data infields within Joomla articles.
$userId = JFactory::getUser($this->item->created_by)->id;
$db = JFactory::getDbo();
$query = $db->getQuery(true);
$query->select('value');
$query->from($db->quoteName('#__fields_values'));
$query->where($db->quoteName('item_id')." = ".$db->quote($userId));
$db->setQuery($query);
$fields = $db->loadColumn();
foreach ($fields as $field) {
echo $field;
}
This way we are obtaining the data directlyis to contribute ideas and from the user who has created the articleways to solve it.