I am trying to create new customer using magento soap api , here is my code :
$client = new SoapClient('http://map.itgprojects.pw/api/v2_soap?wsdl=1');
`$session = $client->login('mylogiin',` 'myapikey');
$result = $client->customerCustomerCreate($session, ['email' => '[email protected]', 'firstname' => 'Dough', 'lastname' => 'Deeks', 'password' => 'password', 'website_id' => 1, 'store_id' => 1, 'group_id' => 1]);
var_dump ($result);
I keep getting this error and I don't know why, even if the user has been added to the database :
Uncaught SoapFault exception: [SOAP-ENV:Server] Call to a member function getUserId() on null in /home/mapitgprojects/public_html/api/customer.php:51
version of magento : 1.9
I am working on an ionic app and I'am creating a web service to do some stuff.
Thank you for your help