How can I login Magento customer account programmatically
You will need to load the Magento customer object first and then call login method
$email = "test@test.com"; $password = "test"; $websiteId = Mage::app()->getWebsite()->getId(); $store = Mage::app()->getStore(); $customer = Mage::getModel("customer/customer"); $customer->website_id = $websiteId; $customer->setStore($store); try { $customer->loadByEmail($email); $session = Mage::getSingleton('customer/session')->setCustomerAsLoggedIn($customer); $session->login($email, $password); }catch(Exception $e){ }