2017-04-06 10 views

答えて

0

このコードを使用してください:

<?php 
$objectManager = \Magento\Framework\App\ObjectManager::getInstance(); 
$customer = $objectManager->get('Magento\Customer\Model\Customer'); 
$customer->setWebsiteId('1'); 
$customer->loadByEmail('[email protected]'); 
?> 
0

ます。また、この試すことができます:あなたの関数内のコードの下

protected $customerCollection; 

public function __construct(
    ... 
    \Magento\Customer\Model\Customer $customerCollection, 
    ...  
) 
{ 
    ... 
    $this->customerCollection = $customerCollection; 
    ... 
} 

使用: -

$customerObj = $this->customerCollection; 
$customerObj->setWebsiteId($websiteId); 
$customerObj->loadByEmail('[email protected]');