How to get the loggedin user information in magento

In most cases we need to get the current logged in user information like his/her email address, Id, any other attributes value. then we can get this by below code :

//Customer Email 
Mage::getSingleton('customer/session')->getCustomer()->getEmail());

// Customer First name
Mage::getSingleton('customer/session')->getCustomer()->getFirstName());

And also we can find the custom attribute values.

Comments

5 responses to “How to get the loggedin user information in magento”

Leave a Reply

Your email address will not be published. Required fields are marked *

*