orocommerce
orocommerce copied to clipboard
Update CustomerUserListener.php
I create a user on Import and want to send an E-Mail, so I use the \Oro\Bundle\CustomerBundle\Entity\CustomerUserManager::sendConfirmationEmail but it fails, cause of an empty RequestStack.
Simple fix in my eys.
Thank you for your pull request.
It looks like this may be your first contribution to an Oro, Inc. open source project, in which case you'll need to sign a Contributor License Agreement (CLA) at https://oroinc.com/b2b-ecommerce/contributor-license-agreement/
If you've already signed the CLA, it's possible we don't have your GitHub username or you're using a different email address. GitHub uses the email address you set in your local Git configuration to associate commits with your GitHub account. Please sign the CLA again using the correct GitHub username and email address or see this help article on setting the email on your git commits.
Once you've signed the CLA, please allow for some time for the submission to be processed.
@orocla I agreeed the Contributor License Agreement
What's next?
@Scarbous please explain your use case a little more. For example, why do you need to dispatch CustomerUserEmailSendEvent at all? There are only two listeners for this event, both of them are in the CheckoutBundle, and both of them work with the data retrieved from the (web) request. If you are not working in a context of a web request - you don't need to dispatch CustomerUserEmailSendEvent.
Internal ticket id BB-16016
@mbessolov I Import Users and want to sendConfirmationEmail but the action works only with an HTTP Request.
My Workaround is to create an empty requestStack request.
$this->requestStack->push(Request::create(''));