* Add the custom fields OR array of participant's profile info.
*
* @param int $id
- * @param string $name
+ * @param string $name eg. customPre or additionalCustomPost to denote the profile location.
* @param int $cid
* @param \CRM_Core_Smarty $template
* @param int $participantId
}
}
- if (count($val)) {
- $template->assign($name, $val);
- }
-
- if (count($groupTitles)) {
- $template->assign($name . '_grouptitle', $groupTitles);
- }
+ $template->assign($name, $val);
+ $template->assign($name . '_grouptitle', $groupTitles);
//return if we only require array of participant's info.
if ($returnResults) {
- if (count($val)) {
+ if ($val) {
return [$val, $groupTitles];
}
- else {
- return NULL;
- }
+ return NULL;
}
}