Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add customer changed email event #2826

Conversation

MelvinAchterhuis
Copy link
Contributor

@MelvinAchterhuis MelvinAchterhuis commented Nov 4, 2022

1. Why is this change necessary?

When connecting with external data systems it can be handy to know when a customer changes their email address in Shopware. This also sets the foundation for a new email template that can be send to the old email address to inform the customer that their email address is changed + what the new email address is

2. What does this change do, exactly?

Adds a new event that dispatches when customer changes their email address in Shopware

3. Describe each step to reproduce the issue or behaviour.

N/A

4. Please link to the relevant issues (if any).

N/A

5. Checklist

  • I have rebased my changes to remove merge conflicts
  • I have written tests and verified that they fail without my change
  • I have created a changelog file with all necessary information about my changes
  • I have written or adjusted the documentation according to my changes
  • This change has comments for package types, values, functions, and non-obvious lines of code
  • I have read the contribution requirements and fulfil them.

Comment on lines +136 to +140

$data->set('password', null);

$event = new CustomerChangedEmailEvent($context, $customer, $data);
$this->eventDispatcher->dispatch($event);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @MelvinAchterhuis, do you think it will dispatch a single event twice?

$requestDataBag->set('password', null);

$event = new CustomerChangedEmailEvent($context, $customer, $requestDataBag);
$this->eventDispatcher->dispatch($event);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @MelvinAchterhuis
Would you please adjust the testcases as well, to ensure this event will be fired.

@keulinho
Copy link
Contributor

keulinho commented Jan 2, 2023

We will close this for now because of inactivity, if you come around working on the open comments feel free to reopen the PR.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants