orocommerce icon indicating copy to clipboard operation
orocommerce copied to clipboard

Update CustomerUserListener.php

Open Scarbous opened this issue 3 years ago • 6 comments

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.

Scarbous avatar Mar 12 '21 16:03 Scarbous

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 avatar Mar 12 '21 17:03 orocla

@orocla I agreeed the Contributor License Agreement

Scarbous avatar Mar 26 '21 12:03 Scarbous

What's next?

Scarbous avatar Apr 30 '21 17:04 Scarbous

@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.

mbessolov avatar Apr 30 '21 18:04 mbessolov

Internal ticket id BB-16016

anyt avatar Apr 30 '21 18:04 anyt

@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(''));

Scarbous avatar May 11 '21 09:05 Scarbous