/** * @deprecated deprecated since catalog 15.0.4 * @see \Bitrix\Sale\DiscountCouponsManager * @param int $intUserID User id. * @param array $arModules Modules list. * @return bool */ public static function OnDeleteCouponList($intUserID, $arModules) { global $USER; $boolResult = false; if (empty($arModules) || is_array($arModules) && in_array('catalog', $arModules)) { $intUserID = (int) $intUserID; if (self::$existCouponsManager === null) { self::initCouponManager(); } if (self::$existCouponsManager) { if ($intUserID == DiscountCouponsManager::getUserId()) { return DiscountCouponsManager::clear(true); } return false; } else { if (0 < $intUserID) { $boolCurrentUser = $USER->IsAuthorized() && $intUserID == $USER->GetID(); $boolResult = self::ClearCouponsByManage($intUserID); if ($boolCurrentUser) { self::ClearCoupon(); } } elseif (0 == $intUserID && !$USER->IsAuthorized()) { self::ClearCoupon(); } } } return $boolResult; }