- foreach($userCustomFields as $userField) {
- if (!$result) break;
- $result = true; // TODO: replace this with a function call that inserts a field.
- // Perhaps the entire block should be in the function call?
- }
+ $result = $custom_fields->insertEntityFields(CustomFields::ENTITY_USER, $user_id, $userCustomFields);