$arSubscribeFields = Array( "USER_ID" => $user_id, "FORMAT" => "html", "EMAIL" => $user_mail, "ACTIVE" => "Y", "SEND_CONFIRM" => "N", "SITE_ID" => "s1", "RUB_ID" => $rubs ); $subscr = new CSubscription; $rubID = $subscr->Add($arSubscribeFields);
Array ( [0] => 3 )
$ID = $subscr->Add($arFields); if($ID>0) CSubscription::Authorize($ID); else $strWarning .= "Error adding subscription: ".$subscr->LAST_ERROR."<br>";
$rubID = $subscr->Add($arSubscribeFields, "s1");