loadByEmail and load method issue in Magento in Customer Model

magento, php

Solution

Finally i founds solution for my problem.

        $customer = Mage::getModel("customer/customer"); 
        $customer->setWebsiteId(Mage::app()->getWebsite('admin')->getId()); 
        $customer->loadByEmail($email);

Problem

i getting error while i am try to use get Entity Id (getEntityId()) Method in customer/customer model object. Please check my bellow's code. I want to use bellow's code. But its showing error. ``` $customer = Mage::getModel("customer/customer"); $customer->setWebsiteId(Mage::app()->getWebsite()->getId()); $customer->loadByEmail('email@example.com'); //load customer by email id ``` While bellow's code is working fine. with getEntityId() ``` $id=3; $customer = Mage::getModel('customer/customer')->load($id); ``` So Please give solution for loadByEmail() method.

Original source

Related problems