• Модуль: crm
  • Путь к файлу: ~/bitrix/modules/crm/lib/integrity/persondedupedatasource.php
  • Класс: Bitrix\Crm\Integrity\PersonDedupeDataSource
  • Вызов: PersonDedupeDataSource::getEntityMatchesByHash
protected function getEntityMatchesByHash($entityTypeID, $entityID, $matchHash)
{
	$matches = DuplicatePersonCriterion::loadEntityMatches($entityTypeID, $entityID);
	if(!is_array($matches))
	{
		return null;
	}

	if(DuplicatePersonCriterion::prepareMatchHash($matches) === $matchHash)
	{
		return $matches;
	}

	if(isset($matches['SECOND_NAME']) && $matches['SECOND_NAME'] !== '')
	{
		$matches['SECOND_NAME'] = '';
		if(DuplicatePersonCriterion::prepareMatchHash($matches) === $matchHash)
		{
			return $matches;
		}
	}

	if(isset($matches['NAME']) && $matches['NAME'] !== '')
	{
		$matches['NAME'] = '';
		if(DuplicatePersonCriterion::prepareMatchHash($matches) === $matchHash)
		{
			return $matches;
		}
	}

	return null;
}