Describe the bug
When you create two customers with same email from webservice, it doesn't throw any error. Then when you try to login with one of two customers, the login form fails.
To Reproduce
Steps to reproduce the behavior:
Additionnal information
PrestaShop version: 1.7.5.1
PHP version: N/A
I would be glad to fix it if some of mantainers give me some clue about what files should be involved.
Hi @mowcixo,
Yes I manage to reproduce the issue with PS1.7.5.1 & PS1.7.4.4.
I used this script
<?php
/**
* Created by PhpStorm.
* User: khouloud.belguith
* Date: 08/13/19
* Time: 14:44
*/
ini_set('display_errors','on');
// Here we define constants /!\ You need to replace this parameters
define('DEBUG', true); // Debug mode
// !! BACHA, nezapomenout p艡enastavit i DTB u obr谩zk暖 dole !!!
define('PS_SHOP_PATH', 'http://shop/'); // Root path of your PrestaShop store
define('PS_WS_AUTH_KEY', 'Key'); // Auth key (Get it in your Back Office)
require_once('./PSWebServiceLibrary.php');
$psXML = <<<XML
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<prestashop xmlns:xlink="http://www.w3.org/1999/xlink">
<customer>
<email>[email protected]</email>
<firstname>khouloud</firstname>
<lastname>belguith</lastname>
<passwd>abc123</passwd>
</customer>
</prestashop>
XML;
$webService = new PrestaShopWebservice(PS_SHOP_PATH, PS_WS_AUTH_KEY, DEBUG);
$xml = new SimpleXMLElement($psXML);
var_dump($xml->asXML());
$opt = array( 'resource' => 'customers' );
$opt['postXml'] = $xml->asXML();
//$opt['id_shop'] = 'all';
for ($i = 1; $i <= 2; $i++) {
$xml = $webService->add( $opt );
}
Which I can create two customers with same informations successfully.
But, in Fo, I have an error in FO.

I鈥檒l add this to the debug roadmap so that it鈥檚 fixed. If you have already fixed it on your end or if you think you can do it, please do send us a pull request!
Thanks!
@khouloudbelguith Could you try to reproduce it with 1.7.6.x ?
Hi @marionf,
Yes, I manage to reproduce the issue with PS1.7.6.0beta1
https://drive.google.com/file/d/1XrZwxiXf4Fh1DHSwJPizbw4TPU_ukVCr/view
Thanks!
Can i submit a merge request to fix that?
Hello @Mch0
Yes, sure, you can make a pull request on GitHub with your code suggestion:
https://github.com/PrestaShop/PrestaShop/tree/develop
Thank you!