请确保您的密码在用户注册1.9.2.0时匹配
-
19-12-2019 - |
题
app/code/core/Mage/Customer/Model/Customer.php
我找到了一些我必须改变的答案: $confirmation = $this->getConfirmation();
在 $confirmation = $this->getPasswordConfirmation();
但我在我的代码中我发现很好 $confirmation = $this->getPasswordConfirmation();
我试图做相反的事情,改变 $confirmation = $this->getPasswordConfirmation();
在 $confirmation = $this->getConfirmation();
它的工作原理,但有一个问题:
当我输入信息并提交时,它会将我重定向到一个空白页面 url: http://www.domaine.com/customer/account/createpost/
当我刷新页面时,它会将我重定向到 http : //www.domaine.com/customer/account/
与仪表板和创建的帐户。
任何人都知道为什么第一个url有一个空白页面以及如何解决这个问题
解决方案
搜寻 setConfirmation()
和 getConfirmation()
在您的扩展中,并替换为 setPasswordConfirmation()
和 getPasswordConfirmation()
.
或者,如果他们应该保持与旧版本兼容,请使用如下所示:
$info = Mage::getVersionInfo();
$version = "{$info['major']}.{$info['minor']}.{$info['revision']}.{$info['patch']}";
if($version >= '1.9.1.0'){
$customer->setPasswordConfirmation($this->getRequest()->getPost('confirmation')); // just check the name of confirm password field in the registration form accordlingly add the name in the get Post
} else {
$customer->setConfirmation($this->getRequest()->getPost('confirmation')); // just check the name of confirm password field in the registration form accordlingly add the name in the get Post
}