Exemplo n.º 1
0
 /**
  * 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;
 }
Exemplo n.º 2
0
 /**
  * @covers Mage_ImportExport_Model_Resource_Customer_Storage::addCustomer
  */
 public function testGetCustomerId()
 {
     $customer = $this->_addCustomerToStorage();
     $this->assertEquals($customer->getId(), $this->_model->getCustomerId($customer->getEmail(), $customer->getWebsiteId()));
     $this->assertFalse($this->_model->getCustomerId('*****@*****.**', $customer->getWebsiteId()));
 }