From 32e87360c07a4b73d9f521ce8aa54d49c31c39ab Mon Sep 17 00:00:00 2001 From: Aleksei Novikov Date: Sun, 15 Mar 2026 01:08:01 +0600 Subject: [PATCH] fix: hotfix user data corruption in Bitrix while getting user history from RetailCRM Bug caused by a combination of factors, including missing checks and resuing of CustomerBuilder. Refs: https://github.com/retailcrm/bitrix-module/issues/415 --- .../classes/general/history/RetailCrmHistory_v5.php | 3 ++- intaro.retailcrm/description.ru | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/intaro.retailcrm/classes/general/history/RetailCrmHistory_v5.php b/intaro.retailcrm/classes/general/history/RetailCrmHistory_v5.php index aaff0daa..26efcbc4 100644 --- a/intaro.retailcrm/classes/general/history/RetailCrmHistory_v5.php +++ b/intaro.retailcrm/classes/general/history/RetailCrmHistory_v5.php @@ -126,9 +126,10 @@ public static function customerHistory() RetailcrmConfigProvider::setCustomersHistorySinceId($lastId['id']); $newUser = new CUser(); - $customerBuilder = new CustomerBuilder(); foreach ($customers as $customer) { + $customerBuilder = new CustomerBuilder(); + if (function_exists('retailCrmBeforeCustomerSave')) { $newResCustomer = retailCrmBeforeCustomerSave($customer); if (is_array($newResCustomer) && !empty($newResCustomer)) { diff --git a/intaro.retailcrm/description.ru b/intaro.retailcrm/description.ru index 7e543a01..4c6090e7 100644 --- a/intaro.retailcrm/description.ru +++ b/intaro.retailcrm/description.ru @@ -1 +1 @@ -- Добавлена передача даты рождения клиента в CRM +- Срочное исправление порчи данных пользователей в Битриксе при загрузке истории из RetailCRM (#415)