Sunday, 29 July 2018

Magento - where is getEmail() defined?

You can find out the e-mail of the logged in user by using the following code:

$customer = Mage::getSingleton('customer/session')->getCustomer();
$mail = $customer->getEmail();

How to find out where getEmail() is defined?

I searched in app\code\core\Mage\Customer\Model\Resource\Customer.php but there is no function called getEmail().

I only found this:

enter image description here

So I tracked it back with NetBeans, and the file lib\Varien\Object.php opens.

But there is no function getEmail() either?

I searched the whole project for the string public function getEmail(),

this is the result:

$ grep -iR "public function getEmail()"
app/code/core/Mage/Catalog/Block/Product/Send.php:    public function getEmail()
app/code/core/Mage/Newsletter/Model/Subscriber.php:    public function getEmail()
app/code/core/Mage/Sendfriend/Block/Send.php:    public function getEmail()
app/code/core/_193_Mage/Catalog/Block/Product/Send.php:    public function getEmail()
app/code/core/_193_Mage/Newsletter/Model/Subscriber.php:    public function getEmail()
app/code/core/_193_Mage/Sendfriend/Block/Send.php:    public function getEmail()
app/code/_core/Mage/Catalog/Block/Product/Send.php:    public function getEmail()
app/code/_core/Mage/Newsletter/Model/Subscriber.php:    public function getEmail()
app/code/_core/Mage/Sendfriend/Block/Send.php:    public function getEmail()
lib/Payone/Api/Request/Parameter/Authorization/PersonalData.php:    public function getEmail()
lib/Payone/Api/Request/Parameter/CreateAccess/PersonalData.php:    public function getEmail()
lib/Payone/Api/Request/Parameter/ManageMandate/PersonalData.php:    public function getEmail()
lib/Payone/Api/Request/Parameter/Vauthorization/PersonalData.php:    public function getEmail()
lib/Zend/Gdata/App/Extension/Person.php:    public function getEmail()
lib/Zend/Gdata/Extension/Who.php:    public function getEmail()
lib/Zend/Service/ReCaptcha/MailHide.php:    public function getEmail()
lib/Zend/View/Helper/Gravatar.php:    public function getEmail()



from Magento - where is getEmail() defined?

No comments:

Post a Comment