GetUserSubscription
array CSubscription::GetUserSubscription();
Method returns an array with fields for current user subscription. Subscription is defined by email, saved in visitor cookies, or by authorized user email. Static method.
Parameters
None.
Returned value
Returns array with "Subscription" object fields. If visitor subscription is not found, returns array("ID"=>0, "EMAIL"=>"").
Example
//get current user subscription from cookies $aSubscr = CSubscription::GetUserSubscription(); //get user's newsletter categories $aSubscrRub = CSubscription::GetRubricArray(intval($aSubscr["ID"])); //show subscription form //.....
© «Bitrix24», 2001-2024