Skip to content

Commit 956e446

Browse files
committed
MAGETWO-58392: [Backport][Github] Customer Import - Invalid data for insert #4291 - for 2.0.x
1 parent 54d4e70 commit 956e446

File tree

2 files changed

+4
-8
lines changed

2 files changed

+4
-8
lines changed

app/code/Magento/CustomerImportExport/Model/Import/Customer.php

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -362,15 +362,11 @@ protected function _prepareDataForUpdate(array $rowData)
362362

363363
// password change/set
364364
if (isset($rowData['password']) && strlen($rowData['password'])) {
365-
$entityRow['password_hash'] = $this->_customerModel->hashPassword($rowData['password']);
365+
$rowData['password_hash'] = $this->_customerModel->hashPassword($rowData['password']);
366366
}
367367

368368
// attribute values
369369
foreach (array_intersect_key($rowData, $this->_attributes) as $attributeCode => $value) {
370-
if ($newCustomer && !strlen($value)) {
371-
continue;
372-
}
373-
374370
$attributeParameters = $this->_attributes[$attributeCode];
375371
if ('select' == $attributeParameters['type']) {
376372
$value = isset($attributeParameters['options'][strtolower($value)])
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
email,_website,_store,confirmation,created_at,created_in,default_billing,default_shipping,disable_auto_group_change,dob,firstname,gender,group_id,lastname,middlename,password_hash,prefix,rp_token,rp_token_created_at,store_id,suffix,taxvat,website_id,password
2-
AnthonyANealy@magento.com,base,admin,,5/6/2012 15:53,Admin,1,1,0,,Anthony,Male,1,Nealy,A.,6a9c9bfb2ba88a6ad2a64e7402df44a763e0c48cd21d7af9e7e796cd4677ee28:RF,,,,0,,,1,
3-
LoriBBanks@magento.com,admin,admin,,5/6/2012 15:59,Admin,3,3,0,,Lori,Female,1,Banks,B.,7ad6dbdc83d3e9f598825dc58b84678c7351e4281f6bc2b277a32dcd88b9756b:pz,,,,0,,,0,
2+
AnthonyANealy@magento.com,base,admin,,5/6/2012 15:53,Admin,1,1,0,5/6/2010,Anthony,Male,1,Nealy,A.,6a9c9bfb2ba88a6ad2a64e7402df44a763e0c48cd21d7af9e7e796cd4677ee28:RF,,,,0,,,1,
3+
LoriBBanks@magento.com,admin,admin,,5/6/2012 15:59,Admin,3,3,0,5/6/2010,Lori,Female,1,Banks,B.,7ad6dbdc83d3e9f598825dc58b84678c7351e4281f6bc2b277a32dcd88b9756b:pz,,,,0,,,0,
44
CharlesTAlston@teleworm.us,base,admin,,5/6/2012 16:13,Admin,4,4,0,,Jhon,Female,1,Doe,T.,145d12bfff8a6a279eb61e277e3d727c0ba95acc1131237f1594ddbb7687a564:l1,,,,0,,,2,
55
customer@example.com,base,admin,,5/6/2012 16:15,Admin,4,4,0,,Firstname,Male,1,Lastname,T.,145d12bfff8a6a279eb61e277e3d727c0ba95acc1131237f1594ddbb7687a564:l1,,,,0,,,2,
66
julie.worrell@example.com,base,admin,,5/6/2012 16:19,Admin,4,4,0,,Julie,Female,1,Worrell,T.,145d12bfff8a6a279eb61e277e3d727c0ba95acc1131237f1594ddbb7687a564:l1,,,,0,,,2,
7-
david.lamar@example.com,base,admin,,5/6/2012 16:25,Admin,4,4,0,,David,Male,1,Lamar,T.,145d12bfff8a6a279eb61e277e3d727c0ba95acc1131237f1594ddbb7687a564:l1,,,,0,,,2,
7+
david.lamar@example.com,base,admin,,5/6/2012 16:25,Admin,4,4,0,,David,,1,Lamar,T.,145d12bfff8a6a279eb61e277e3d727c0ba95acc1131237f1594ddbb7687a564:l1,,,,0,,,2,

0 commit comments

Comments
 (0)