CSubscriptionGeneral class
CSubscriptionGeneral class handles subscriptions to newsletters.
Class methods
Method | Description | Available from version |
---|---|---|
Add | Adds a subscription to newsletter and sends an email with confirmation code to the subscriber (if not specified otherwise). | |
Authorize | Authorizes visitor for access to subscription editing. Saves the attribute for successful authorization in PHP session. | |
ConfirmEvent | Adds an event SUBSCRIBE_CONFIRM for sending an email with subscription confirmation code. Email is generated by template type "SUBSCRIBE_CONFIRM - Subscription confirmation". | |
Delete | Deletes a subscription. | |
GetByID | Selects subscription by its ID. | |
GetList | Selects list of subscriptions by filter. | |
GetRubricArray | Returns an array with newsletter IDs for current subscribed address. | |
GetRubricList | Returns a selection of newsletters for current subscribed address. | |
GetUserSubscription | Returns array with subscription fields for current user. Subscription is defined by an email, saved in the visitor cookies, or by an authorized user email. | |
IsAuthorized | Verifies if the current user is authorized for accessing subscription details. | |
Update | Updates subscription details. In case subscription address is updated the method removes subscription confirmation and generates an event for sending email with subscription confirmation code (if such action is not restricted). If subscription isn't confirmed, and array with fields includes a correct CONFIRM_CODE - the subscription is verified. |
© «Bitrix24», 2001-2024