宇讯一资源

magento 1.9 帐户无法注册登录

发布于2020年03月23日 | 暂无评论 | 157阅读 | magento

If you cannot create a customer or login after applying patch SUPEE-6788 or upgrading to Magento 1.9.2.2 or later, this might be caused by missing form keys.

Make sure to add form keys to all of your (custom) template files:

In app/design/frontend/[package]/[theme]/template/customer/form/register.phtml and app/design/frontend/[package]/[theme]/template/persistent/customer/form/register.phtml

Add

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

after

< input type="hidden" name="error_url" value="<?php echo $this->getErrorUrl() ?>" / >

就是说,在你的两个模板文件 app/design/frontend/[package]/[theme]/template/customer/form/register.phtml 和app/design/frontend/[package]/[theme]/template/persistent/customer/form/register.phtml 里,找到这行代码:

< input type="hidden" name="error_url" value="<?php echo $this->getErrorUrl() ?>" / >

在这行代码后面加上下面这行代码:

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

暂无评论

发布评论