//@todo hook are called from create and add - remove one
CRM_Utils_Hook::pre($hook, 'Relationship', $relationshipId, $params);
- self::setContactABFromIDs($params);
+ self::setContactABFromIDs($params, $ids);
$relationshipTypes = CRM_Utils_Array::value('relationship_type_id', $params);
// explode the string with _ to get the relationship type id
// Membership for related contacts CRM-1657
if (CRM_Core_Permission::access('CiviMember') && (!$duplicate)) {
$params['relationship_ids'] = $relationshipIds;
- if ($this->_action & CRM_Core_Action::ADD) {
+ if ($this->_action & CRM_Core_Action::ADD && !empty($params['is_active'])) {
CRM_Contact_BAO_Relationship::relatedMemberships($this->_contactId,
$params, $ids,
$this->_action