Subscribe: подписываем/отписываем пользователя

if(CModule::IncludeModule("subscribe")){
	if ($_POST["SUBSCRIBE"] == "Y") {
		$arFields = Array(
			"USER_ID" => $USER->GetID(),
			"FORMAT" => "html",
			"EMAIL" => $USER->GetEmail(),
			"ACTIVE" => "Y",
			"RUB_ID" => array()
		);
		$subscr = new CSubscription;
		$ID = $subscr->Add($arFields);
		if($ID>0) {
			CSubscription::Authorize($ID);
		}
	} else {
		$subscription = CSubscription::GetByEmail($USER->GetEmail());
		if($subscription->ExtractFields("str_")) {
			$ID = (integer)$str_ID;
		}
		if ($ID >0) {
			$res = CSubscription::Delete($ID);
		}
	}
}