Check email field length (#163)
This commit is contained in:
parent
4a5c5d6fd2
commit
797a4d41de
@ -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
|
||||
}
|
||||
|
@ -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) {
|
||||
|
@ -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'];
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user