JLoader::register('FieldsHelper', JPATH_ADMINISTRATOR . '/components/com_fields/helpers/fields.php');
$fields = FieldsHelper::getFields('com_users.user', $user, true);
$marital_status = '';
foreach ($fields as $field)
{
if($field->name == 'marital_status') {
$marital_status = $field->value;
break;
}
}
return $marital_status == 'single';