If you have recently upgraded Magento, and you have a custom template, you will notice that you are unable to login as a customer into the site. 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. I have been fixing numerous sites recently, so I thought I’d share.
Here is the solution:
1 – Go to app/design/frontend/[Your-package]/[Your-theme]/template/customer/form/login.phtml
Find: <ul class=”form-list”>
and paste this right after the code above:
<input type="hidden" name="form_key" value="<?php echo Mage::getSingleton('core/session')->getFormKey(); ?>" />
2 – Go to app/design/frontend/Your-package]/[Your-theme]/template/persistent/customer/form/login.phtml and apply the same changes.
I hope this helps. Let’s Like, Share and Subscribe if you find this post useful for you