diff --git a/intaro.retailcrm/classes/general/order/RetailCrmOrder_v4.php b/intaro.retailcrm/classes/general/order/RetailCrmOrder_v4.php index 7bcdac26..47206a48 100644 --- a/intaro.retailcrm/classes/general/order/RetailCrmOrder_v4.php +++ b/intaro.retailcrm/classes/general/order/RetailCrmOrder_v4.php @@ -87,6 +87,8 @@ class RetailCrmOrder if (in_array($search, array('fio', 'phone', 'email'))) {//fio, phone, email if ($search == 'fio') { $order = array_merge($order, RCrmActions::explodeFIO($prop['VALUE'][0]));//add fio fields + } elseif ($search == 'email' && mb_strlen($prop['VALUE'][0]) > 100) { + continue; } else { $order[$search] = $prop['VALUE'][0];//phone, email } diff --git a/intaro.retailcrm/classes/general/order/RetailCrmOrder_v5.php b/intaro.retailcrm/classes/general/order/RetailCrmOrder_v5.php index 57b87465..436000fd 100644 --- a/intaro.retailcrm/classes/general/order/RetailCrmOrder_v5.php +++ b/intaro.retailcrm/classes/general/order/RetailCrmOrder_v5.php @@ -91,6 +91,8 @@ class RetailCrmOrder if (in_array($search, array('fio', 'phone', 'email'))) {//fio, phone, email if ($search == 'fio') { $order = array_merge($order, RCrmActions::explodeFIO($prop['VALUE'][0]));//add fio fields + } elseif ($search == 'email' && mb_strlen($prop['VALUE'][0]) > 100) { + continue; } else { // ignoring a property with a non-set group if the field value is already set if (!empty($order[$search]) && $prop['PROPS_GROUP_ID'] == 0) { diff --git a/intaro.retailcrm/classes/general/user/RetailCrmUser.php b/intaro.retailcrm/classes/general/user/RetailCrmUser.php index 765684fc..4867945a 100644 --- a/intaro.retailcrm/classes/general/user/RetailCrmUser.php +++ b/intaro.retailcrm/classes/general/user/RetailCrmUser.php @@ -49,6 +49,10 @@ class RetailCrmUser $customer['address']['index'] = $arFields['PERSONAL_ZIP']; } + if (mb_strlen($arFields['EMAIL']) > 100 ) { + unset($customer['email']); + } + if ($send && isset($_COOKIE['_rc']) && $_COOKIE['_rc'] != '') { $customer['browserId'] = $_COOKIE['_rc']; } @@ -99,6 +103,10 @@ class RetailCrmUser $customer['patronymic'] = $arFields['SECOND_NAME']; } + if ( mb_strlen($arFields['EMAIL']) > 100) { + unset($customer['email']); + } + if (!empty($arFields['PERSONAL_PHONE'])) { $customer['phones'][]['number'] = $arFields['PERSONAL_PHONE']; }