}
}
- list($membership, $renewalMode, $dates) = self::renewMembership(
+ list($membership, $renewalMode, $dates) = self::renewMembership(
$contactID, $memType, $isTest,
date('YmdHis'), CRM_Utils_Array::value('cms_contactID', $membershipParams), $customFieldsFormatted,
$numTerms, $membershipID, $pending,
* Add the membership log record.
*
* @param array $params
- * Reference array contains the values submitted by the form.
- * @param array $ids
- * Reference array contains the id.
+ * Properties of the log item.
*
- *
- * @return object
+ * @return CRM_Member_DAO_MembershipLog|CRM_Core_Error
*/
- public static function add(&$params) {
+ public static function add($params) {
$membershipLog = new CRM_Member_DAO_MembershipLog();
$membershipLog->copyValues($params);
-
$membershipLog->save();
$membershipLog->free();
}
/**
+ * Reset the modified ID to NULL for log items by the given contact ID.
+ *
* @param int $contactID
*/
public static function resetModifiedID($contactID) {
$this->_params['is_pay_later'] = 1;
}
- $contributionRecurID = isset($form->_params['contributionRecurID']) ? $form->_params['contributionRecurID'] : NULL;
+ $contributionRecurID = isset($this->_params['contributionRecurID']) ? $this->_params['contributionRecurID'] : NULL;
$membershipSource = NULL;
if (!empty($form->_params['membership_source'])) {
}
$renewMembership = CRM_Member_BAO_Membership::renewMembership(
$this->_contactID, $formValues['membership_type_id'][1], $isTestMembership,
- $renewalDate, NULL, $customFieldsFormatted, $numRenewTerms, $this->_membershipId, self::extractPendingFormValue($this, $formValues['membership_type_id'][1],
+ $renewalDate, NULL, $customFieldsFormatted, $numRenewTerms, $this->_membershipId,
+ self::extractPendingFormValue($this, $formValues['membership_type_id'][1]),
$contributionRecurID, $membershipSource, $isPayLater, $campaignId
);
$endDate = CRM_Utils_Date::processDate($renewMembership->end_date);
- // Retrieve the name and email of the current user - this will be the FROM for the receipt email
- $session = CRM_Core_Session::singleton();
- $userID = $session->get('userID');
-
- list($userName, $userEmail) = CRM_Contact_BAO_Contact_Location::getEmailDetails($userID);
+ list($userName) = CRM_Contact_BAO_Contact_Location::getEmailDetails(CRM_Core_Session::singleton()->get('userID'));
$memType = CRM_Core_DAO::getFieldValue('CRM_Member_DAO_MembershipType', $renewMembership->membership_type_id, 'name');