FIX – Customer cannot login to magento



The issue is raising because the custom login form does not contain any form_key and there is a form key validation happening in loginPostAction of magento.

Here is the solution:


Edit template/customer/form/login.phtml and template/persistent/customer/form/login.phtml


If you are using any module for login the also edit the login.phtml file of that plugin.




<input type="hidden" name="form_key" value="<?php echo Mage::getSingleton('core/session')->getFormKey();

add the above code after in the login form before



<ul class="form-list">

Rakesh Singh Uniyal

I’m Rakesh Singh Uniyal (MCA) and I write to help people work on programming and technology. The tips, tutorials and information provided in this blog has helped many people to solve their programming and web development related issues.
I work as a Freelance PHP/Magento/Wordpress Developer.

No comments:

Post a Comment