• Модуль: socialnetwork
  • Путь к файлу: ~/bitrix/modules/socialnetwork/classes/general/log_events.php
  • Класс: CAllSocNetLogEvents
  • Вызов: CAllSocNetLogEvents::DeleteByUserAndEntity
static function DeleteByUserAndEntity($userID, $entityType, $entityID)
{
	global $DB;

	$userID = intval($userID);
	if ($userID <= 0)
		return false;

	$entityType = Trim($entityType);

	if (!in_array($entityType, CSocNetAllowed::GetAllowedEntityTypes()))
	{
		return false;
	}

	$entityID = intval($entityID);
	if ($entityID <= 0)
		return false;

	$bSuccess = $DB->Query(
		"DELETE FROM b_sonet_log_events ".
		"WHERE USER_ID = ".$userID." ".
		"	AND ENTITY_TYPE = '".$DB->ForSql($entityType, 1)."' ".
		"	AND ENTITY_ID = ".$entityID."",
		true
	);

	return $bSuccess;
}