ConfirmEvent
Description and parameters
bool CSubscription::ConfirmEvent( int ID, string SITE_ID = SITE_ID );
Method adds an event SUBSCRIBE_CONFIRM for sending to subscriber an email containing subscription verification code. Email is generated by template "SUBSCRIBE_CONFIRM - Subscription confirmation". Static method.
Parameters
Parameter | Description | Available from version |
---|---|---|
ID | Subscription identifier. | |
SITE_ID | Site identifier, used to identify template for subscription confirmation email. By default, parameter receives current site value. |
Returned value
On successfully added event, returns true, otherwise false.
Also, returns false if subscription is already confirmed (CONFIRMED is "Y").
Example
if($ID > 0) { //confirmation code request if($action == "sendcode") { if(CSubscription::ConfirmEvent($ID)) echo "Subscription confirmation was sent successfully"; } }
© «Bitrix24», 2001-2024