elseif (isset($params['cms_contactID'])) {
$contactID = $params['cms_contactID'];
}
- CRM_Contribute_BAO_Contribution_Utils::createCMSUser($params,
- $contactID,
- 'email-' . $form->_bltID
- );
//create contribution activity w/ individual and target
//activity w/ organisation contact id when onbelf, CRM-4027
}
$transaction->commit();
+ // CRM-13074 - create the CMSUser after the transaction is completed as it
+ // is not appropriate to delete a valid contribution if a user create problem occurs
+ CRM_Contribute_BAO_Contribution_Utils::createCMSUser($params,
+ $contactID,
+ 'email-' . $form->_bltID
+ );
return $contribution;
}