File tree Expand file tree Collapse file tree 1 file changed +4
-6
lines changed Expand file tree Collapse file tree 1 file changed +4
-6
lines changed Original file line number Diff line number Diff line change @@ -1220,15 +1220,13 @@ public function transformToCustomer($idLang, $password = null)
1220
1220
/*
1221
1221
* If this is an anonymous conversion and we want the customer to set his own password,
1222
1222
* we set a random one for now.
1223
- * TODO - This should be revised in the future because 16 chars can be outside of bounds of
1224
- * isAcceptablePasswordLength. It should not be checked.
1225
1223
*/
1226
1224
if (empty ($ password )) {
1227
1225
$ password = Tools::passwdGen (16 , 'RANDOM ' );
1228
- }
1229
-
1230
- if (!Validate:: isAcceptablePasswordLength ( $ password ) || !Validate:: isAcceptablePasswordScore ( $ password )) {
1231
- return false ;
1226
+ } else {
1227
+ if (!Validate:: isAcceptablePasswordLength ( $ password ) || !Validate:: isAcceptablePasswordScore ( $ password )) {
1228
+ return false ;
1229
+ }
1232
1230
}
1233
1231
1234
1232
/** @var \PrestaShop\PrestaShop\Core\Crypto\Hashing $crypto */
You can’t perform that action at this time.
0 commit comments