// db and current fronten user objects
$db = JFactory::getDBO();
$user = JFactory::getUser();
// Get user's access levels
if (!FLEXI_J16GE) $aid = (int) $user->get('aid');
else $aid_arr = $user->getAuthorisedViewLevels();
// Get field data from DB
$my_fieldnames = array("field_name1", "field_name2", "field_name3");
$query = 'SELECT * FROM #__flexicontent_fields WHERE name IN ("'
.implode($my_fieldnames, '", "')
.'")';
$db->setQuery($query);
$my_fields = $db->loadObjectList('name');
// For every found field create field parameter and check (VIEW) access level
if ( !empty($my_fields) ) foreach($my_fields as $my_field)
$my_field->parameters = FLEXI_J16GE ? new JRegistry($my_field->attribs) : new JParameter($my_field->attribs);
$my_field->has_access = FLEXI_J16GE ? in_array($my_field->access, $aid_arr) : $my_field->access <= $aid;
}