/** * Set expired relationships to disabled. * * @param array $params * * @return array * @throws \API_Exception */ function civicrm_api3_job_disable_expired_relationships($params) { $result = CRM_Contact_BAO_Relationship::disableExpiredRelationships(); if (!$result) { throw new API_Exception('Failed to disable all expired relationships.'); } return civicrm_api3_create_success(1, $params, 'Job', 'disable_expired_relationships'); }
/** * Set expired relationships to disabled. * */ function civicrm_api3_job_disable_expired_relationships($params) { $result = CRM_Contact_BAO_Relationship::disableExpiredRelationships(); if ($result) { return civicrm_api3_create_success(); } else { return civicrm_api3_create_error('Failed to disable all expired relationships.'); } }