phpapiemailmagentomagento-1.9.1

Send confirmation email when user was registered by API Magento


I turned on the option System -> Configuration -> Customer Configuration -> Require Emails Confirmation and now when users registered by usual form they get the email with required account confirmation. But now I need to do the same for users created by Magento API. I set this options:

$result = $proxy->customerCustomerCreate($sessionId, [
    'email' => 'mycustomemail@gmail.com',
    'firstname' => 'testfirstname',
    'lastname' => 'testlastname',
    'password' => 'testpassword',
    'website_id' => 1,
    'store_id' => 1,
    'group_id' => 4,
]);

When I compared records in database for user created by form and API, they were exactly the same. I mean fields website_id and store_id were the same. How can I debug this or maybe you can tell me how to implement this feature into Magento's API?

P.S: System -> Configuration -> Customer Configuration -> Share Customer Accounts is set to Global.


Solution

  • Well, the solution is to override Model Mage/Customer/Model/Customer/Api.php. More about that here !