Skip to content

Commit

Permalink
Update Customer.php
Browse files Browse the repository at this point in the history
  • Loading branch information
ShaiMagal authored Sep 2, 2024
1 parent fca3533 commit cacaba5
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions classes/Customer.php
Original file line number Diff line number Diff line change
Expand Up @@ -1222,12 +1222,11 @@ public function transformToCustomer($idLang, $password = null)
* we set a random one for now.
*/
if (empty($password)) {
$this->passwd = Tools::passwdGen(16, 'RANDOM');
$password = Tools::passwdGen(16, 'RANDOM');
} else {
if (!Validate::isAcceptablePasswordLength($password) || !Validate::isAcceptablePasswordScore($password)) {
return false;
}
$this->passwd = $crypto->hash($password);
}

/** @var \PrestaShop\PrestaShop\Core\Crypto\Hashing $crypto */
Expand Down

0 comments on commit cacaba5

Please sign in to comment.