JustOneStepSolutions
A blog for Web Developers, Magento, PHP, JavaScript, jQuery.
Friday, July 20, 2012
Customer Login By Id in Magento
>> $email = "name@gmail.com";
$customer = Mage::getModel('customer/customer');
$customer->setWebsiteId(Mage::app()->getWebsite()->getId());
$customer->loadByEmail(trim($email));
Mage::getSingleton('customer/session')->loginById($customer->getId());
No comments:
Post a Comment
Newer Post
Older Post
Home
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment