Quick PHP question

What do I have to change in the code below to stop Dolphin from sending out the "your membership has changed" email (t_MemChanged)

Can I simply comment out this line?: (memberships_levels.inc.php)

    sendMail( $aProfileInfo['Email'], $aTemplate['Subject'], $aTemplate['Body'], $iMemberId, $aTemplateVars);

 

 


 

    /**
     * set lifetime membership if 0 days is used.
     */
    $iDateExpires = $iDays != 0 ? (int)$iDateStarts + $iDays * $SECONDS_IN_DAY : 'NULL';
    db_res("INSERT `sys_acl_levels_members` (`IDMember`, `IDLevel`, `DateStarts`, `DateExpires`, `TransactionID`) VALUES ('" . $iMemberId . "', '" . $iMembershipId . "', FROM_UNIXTIME(" . $iDateStarts . "), FROM_UNIXTIME(" . $iDateExpires . "), '" . $sTransactionId . "')");
    if(db_affected_rows() <= 0)
       return false;
 
    //Set Membership Alert
    bx_import('BxDolAlerts');
    $oZ = new BxDolAlerts('profile', 'set_membership', '', $iMemberId, array('mlevel'=> $iMembershipId, 'days' => $iDays, 'starts_now' => $bStartsNow, 'txn_id' => $sTransactionId));
    $oZ->alert();
 
    $oEmailTemplate = new BxDolEmailTemplates();
    $aTemplate = $oEmailTemplate->getTemplate('t_MemChanged', $iMemberId);
 
    $aMembershipInfo = getMembershipInfo($iMembershipId);
    $aTemplateVars = array(
        'MembershipLevel' => $aMembershipInfo['Name']
    );
 
    sendMail( $aProfileInfo['Email'], $aTemplate['Subject'], $aTemplate['Body'], $iMemberId, $aTemplateVars);
 
    return true;


Quote · 5 Apr 2012

Yes. That should do it.

But for the sake of performance, everthing below this line.

$oZ->alert();

Up to and including the sendmail line should also be commented out.

Really no point in loading a template that is not going to be sent.

https://www.deanbassett.com
Quote · 5 Apr 2012

Thank you! That worked like a charm.

Quote · 6 Apr 2012
 
 
Below is the legacy version of the Boonex site, maintained for Dolphin.Pro 7.x support.
The new Dolphin solution is powered by UNA Community Management System.