• Модуль: sender
  • Путь к файлу: ~/bitrix/modules/sender/lib/integration/sender/mail/consentresponsemail.php
  • Класс: Bitrix\Sender\Integration\Sender\Mail\ConsentResponseMail
  • Вызов: ConsentResponseMail::isContactUpdated
protected function isContactUpdated($apply)
{
	$typeId = Recipient\Type::detect($this->fields['CODE']);
	$code = Recipient\Normalizer::normalize($this->fields['CODE'], $typeId);

	$contact = ContactTable::getRow([
		'select' => ['CODE', 'CONSENT_STATUS'],
		'filter' => [
			'=ID' => $this->getContactId(),
			'=TYPE_ID' => $typeId,
			'=CODE' => $code,
		]
	]);
	$currentStatus = ($apply ? ContactTable::CONSENT_STATUS_ACCEPT : ContactTable::CONSENT_STATUS_DENY);

	return (
		isset($contact) &&
		$contact['CODE'] === $this->fields['CODE'] &&
		$contact['CONSENT_STATUS'] !== $currentStatus
	);
}