B-219 Sec-55 Noida, India
+918010221733

Force customer login in magento

$customerId = (int) $this->getRequest()->getParam('id');
$customer   = Mage::getModel('customer/customer')->load($customerId);
$userSession = Mage::getSingleton('customer/session');
$userSession->setCustomer($customer);
Mage::dispatchEvent('customer_login', array('customer'=>$customer));
$this->getResponse()->setRedirect(Mage::getUrl('customer/account'));
(Visited 86 times, 1 visits today)

Leave a reply

You must be logged in to post a comment.