/**
  * Get customer id if customer is present in database
  *
  * @param string $email
  * @param string $websiteCode
  * @return bool|int
  */
 protected function _getCustomerId($email, $websiteCode)
 {
     $email = strtolower(trim($email));
     if (isset($this->_websiteCodeToId[$websiteCode])) {
         $websiteId = $this->_websiteCodeToId[$websiteCode];
         return $this->_customerStorage->getCustomerId($email, $websiteId);
     }
     return false;
 }
示例#2
0
 /**
  * @return \Magento\Framework\DataObject
  */
 protected function _addCustomerToStorage()
 {
     $customer = new \Magento\Framework\DataObject(['id' => 1, 'website_id' => 1, 'email' => '*****@*****.**']);
     $this->_model->addCustomer($customer);
     return $customer;
 }