I´ve added a custom users field (called "test"). Now I want to call the value of this custom field for the current user who is logged in.
In the mysql databse I see the custom field under _fields. So how can I call this specific field?
Normally I get the current user object like this:
Basically you have all the custom fields corresponding to the current item accessible via a new property in your $item variable called jcfields. The $item->jcfields property is an array that holds data per field.
You could output the fields this way:
<?php foreach ($this->item->jcfields as $field) : ?> // Render the field using the fields render method <?php echo $field->label . ':' . $field->value; ?> <?php endforeach ?>