Hello!
I am having problem in a Magento (Version 1.9.0.1) of a client in which the same one reported to me that nobody can make register, when trying to realize a register returns the following error:
Fatal error: Undefined class constant 'HASH_SALT_LENGTH' in /clientes/emporioestetica/public_html/app/code/core/Mage/Customer/Model/Customer.php on line 384
Customer.php line 384:
public function hashPassword($password, $salt = null) { return $this->_getHelper('core') ->getHash($password, !is_null($salt) ? $salt : Mage_Admin_Model_User::HASH_SALT_LENGTH); }
Can someone help me?
Solved! Go to Solution.
I found the solution, I changed the file Custumer.php by this:
https://github.com/magecomp/Magento-Pre-Patched-Files/blob/master/SUPEE-5994/CE/1.4.2/app/code/core/...
Thank you for your support
Hi @fabiano_vieira,
Did you made an upgrade recently?
Which version of PHP are you using?
The only related info I was able to find was: https://magento.stackexchange.com/questions/83009/undefined-class-constant-hash-salt-length-how-to-c...
Hi Damian!
Did you made an upgrade recently?
I do not have this information, I got this job already with this version.
Which version of PHP are you using?
PHP Version 5.6.36
* This magento only function in this php version, I tried to change version to php 7 but not working nothing.
The only related info I was able to find was: https://magento.stackexchange.com/questions/83009/undefined-class-constant-hash-salt-length-how-to-c...
I tried to use the code but it did not work.
I found the solution, I changed the file Custumer.php by this:
https://github.com/magecomp/Magento-Pre-Patched-Files/blob/master/SUPEE-5994/CE/1.4.2/app/code/core/...
Thank you for your support
Hi @fabiano_vieira,
Just as recomendation, if you've changed that file please restore the original one into /app/code/core... an create a copy at: /app/code/local/Mage/Customer/Model/Customer.php
Then change that file but left the original one without changes.
In that way you'll be able to handle upgrades without losing your changes.
There are another way to override a model:
But with the first approach you will be right. It will be better if you can apply the rewrites explained on those links.