Bitrix Site Manager

CSubcription::ConfirmEvent

CSubcription::ConfirmEvent(
 $ID, 
 $SITE_ID=SITE_ID
);

The method ConfirmEvent adds an event SUBSCRIBE_CONFIRM that will send the message containing the subscription confirmation code to the subscriber. The message is created using the template "SUBSCRIBE_CONFIRM" (subscription confirmation). 

Parameters

ParameterDescription
$ID The subscription ID.
$SITE_ID The ID of the site used to determine the template of the subscription confirmation message. The parameter has the default value of the current site ID.

Return Values

Returns true on success, or false otherwise.

Example



if($ID > 0)
{
    //confirmation code request
    if($action == "sendcode")
    {
        if(CSubscription::ConfirmEvent($ID))
            echo "Subscription confirmation was sent successfully";
    }
}