public static function ProfileCompleteProfileController::isFieldEmpty in Complete profile 7
1 call to ProfileCompleteProfileController::isFieldEmpty()
File
- includes/
ProfileCompleteProfileController.php, line 4
Class
Code
public static function isFieldEmpty($account, $field) {
if (!isset($account->{$field->name})) {
return TRUE;
}
$value = $account->{$field->name};
switch ($field->type) {
case _profile_field_serialize($field->type):
case 'checkbox':
return empty($value);
default:
return !drupal_strlen(trim($value));
}
}