Skip to content

Commit

Permalink
CORE-1546: Send an email only on successful registration; Adjust phpd…
Browse files Browse the repository at this point in the history
…oc for the customer facade
  • Loading branch information
PhilinTv committed Jul 24, 2017
1 parent f7ffe41 commit 4e49b8e
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 2 deletions.
4 changes: 3 additions & 1 deletion src/Spryker/Zed/Customer/Business/Customer/Customer.php
Original file line number Diff line number Diff line change
Expand Up @@ -187,7 +187,9 @@ public function register(CustomerTransfer $customerTransfer)
{
$customerResponseTransfer = $this->add($customerTransfer);

$this->sendRegistrationToken($customerTransfer);
if ($customerResponseTransfer->getIsSuccess()) {
$this->sendRegistrationToken($customerTransfer);
}

return $customerResponseTransfer;
}
Expand Down
2 changes: 2 additions & 0 deletions src/Spryker/Zed/Customer/Business/CustomerFacade.php
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,8 @@ public function addCustomer(CustomerTransfer $customerTransfer)
}

/**
* {@inheritdoc}
*
* @api
*
* @param \Generated\Shared\Transfer\CustomerTransfer $customerTransfer
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ public function addCustomer(CustomerTransfer $customerTransfer);
* Specification:
* - Hashes password if provided
* - Saves customer
* - Sends registration email if desired
* - Sends registration email (on successful registration)
* - Returns CustomerResponseTransfer with success flag
*
* @api
Expand Down

0 comments on commit 4e49b8e

Please sign in to comment.