• Модуль: catalog
  • Путь к файлу: ~/bitrix/modules/catalog/lib/subscribe.php
  • Класс: BitrixCatalogSubscribeTable
  • Вызов: SubscribeTable::onUserDelete
static function onUserDelete($userId)
{
	$userId = (int)$userId;
	if ($userId <= 0)
		return false;

	$connection = Application::getConnection();
	$helper = $connection->getSqlHelper();
	$connection->queryExecute('update '.$helper->quote(static::getTableName()).' set '
		.$helper->quote('DATE_TO').' = '.$helper->getCurrentDateTimeFunction().', '
		.$helper->quote('USER_ID').' = 'NULL' where '.$helper->quote('USER_ID').' = '.$userId
	);

	return true;
}