*/
static function preProcess(&$form) {
$session = CRM_Core_Session::singleton();
- $contactID = $session->get('userID');
+ $contactID = $form->_contactID;
$ufJoinParams = array(
'module' => 'onBehalf',
$form->assign('fieldSetTitle', ts('Organization Details'));
$form->assign('buildOnBehalfForm', TRUE);
- $session = CRM_Core_Session::singleton();
- $contactID = $session->get('userID');
+ $contactID = $form->_contactID;
if ($contactID && count($form->_employers) >= 1) {
$form->add('text', 'organization_id', ts('Select an existing related Organization OR enter a new one'));