Make sure to setup your cookie domain name exactly same as how you access from browser(with or without www) And check the following settings in
Magento admin under System > Config > Web
And update like following
Cookie Lifetime: 33600
Cookie Path: /
Cookie Domain: www.yourdomainname.com
Use HTTP Only: No
Cookie Restriction Mode: No
This should fix your problem(Clear your browser cookie for one last time and check)
If this doesn't work still your server environment and session/cookie saving doesn'tmatch like magento needed. So you may need to un-comment domain settings in
app/code/core/Mage/Core/Model/Session/Abstract/Varien.php
Around #95 from
// session cookie params
$cookieParams = array(
'lifetime' => $cookie->getLifetime(),
'path' => $cookie->getPath(),
'domain' => $cookie->getConfigDomain(),
'secure' => $cookie->isSecure(),
'httponly' => $cookie->getHttponly()
);
To
// session cookie params
$cookieParams = array(
'lifetime' => $cookie->getLifetime(),
'path' => $cookie->getPath(),
// 'domain' => $cookie->getConfigDomain(),
// 'secure' => $cookie->isSecure(),
// 'httponly' => $cookie->getHttponly()
);
Note:
You can extend this core file to your local and do this and you need to uncomment only the domain,secure,http params not entire cookie params.
cleanPasswordsValidationData()
is not a default method available in Magento. So I guess you have some customizations which are carried out in AccountController.php
or there may be a rewrite for this very same class.
During customer registration, magento will execute createPostAction()
method which is present in app/code/core/Mage/Customer/controllers/AccountController.php
. If you inspect this method, you can't find a method with name cleanPasswordsValidationData()
which is called up on a customer instance.
Even-though you comment it out the line which holds cleanPasswordsValidationData()
, that line of code is intended to use some validation on posted data which is important in case of customer registration process. So instead of commenting it out, you need to dig from there and make the validation correct.
May be this customization is done during development of the site. Contact the developer if you are not a developer. That's the only possibility to resolve this issue.
Best Answer
First you need to use dependency injection to inject the following classes in your constructor
Then in your code you can do: