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 (in_array($search, array('fio', 'phone', 'email'))) {//fio, phone, email
|
||||||
if ($search == 'fio') {
|
if ($search == 'fio') {
|
||||||
$order = array_merge($order, RCrmActions::explodeFIO($prop['VALUE'][0]));//add fio fields
|
$order = array_merge($order, RCrmActions::explodeFIO($prop['VALUE'][0]));//add fio fields
|
||||||
|
} elseif ($search == 'email' && mb_strlen($prop['VALUE'][0]) > 100) {
|
||||||
|
continue;
|
||||||
} else {
|
} else {
|
||||||
$order[$search] = $prop['VALUE'][0];//phone, email
|
$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 (in_array($search, array('fio', 'phone', 'email'))) {//fio, phone, email
|
||||||
if ($search == 'fio') {
|
if ($search == 'fio') {
|
||||||
$order = array_merge($order, RCrmActions::explodeFIO($prop['VALUE'][0]));//add fio fields
|
$order = array_merge($order, RCrmActions::explodeFIO($prop['VALUE'][0]));//add fio fields
|
||||||
|
} elseif ($search == 'email' && mb_strlen($prop['VALUE'][0]) > 100) {
|
||||||
|
continue;
|
||||||
} else {
|
} else {
|
||||||
// ignoring a property with a non-set group if the field value is already set
|
// ignoring a property with a non-set group if the field value is already set
|
||||||
if (!empty($order[$search]) && $prop['PROPS_GROUP_ID'] == 0) {
|
if (!empty($order[$search]) && $prop['PROPS_GROUP_ID'] == 0) {
|
||||||
|
@ -49,6 +49,10 @@ class RetailCrmUser
|
|||||||
$customer['address']['index'] = $arFields['PERSONAL_ZIP'];
|
$customer['address']['index'] = $arFields['PERSONAL_ZIP'];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (mb_strlen($arFields['EMAIL']) > 100 ) {
|
||||||
|
unset($customer['email']);
|
||||||
|
}
|
||||||
|
|
||||||
if ($send && isset($_COOKIE['_rc']) && $_COOKIE['_rc'] != '') {
|
if ($send && isset($_COOKIE['_rc']) && $_COOKIE['_rc'] != '') {
|
||||||
$customer['browserId'] = $_COOKIE['_rc'];
|
$customer['browserId'] = $_COOKIE['_rc'];
|
||||||
}
|
}
|
||||||
@ -99,6 +103,10 @@ class RetailCrmUser
|
|||||||
$customer['patronymic'] = $arFields['SECOND_NAME'];
|
$customer['patronymic'] = $arFields['SECOND_NAME'];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if ( mb_strlen($arFields['EMAIL']) > 100) {
|
||||||
|
unset($customer['email']);
|
||||||
|
}
|
||||||
|
|
||||||
if (!empty($arFields['PERSONAL_PHONE'])) {
|
if (!empty($arFields['PERSONAL_PHONE'])) {
|
||||||
$customer['phones'][]['number'] = $arFields['PERSONAL_PHONE'];
|
$customer['phones'][]['number'] = $arFields['PERSONAL_PHONE'];
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user