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

[11.x] Adding PasswordResetLinkSent event #51253

Merged
merged 3 commits into from
May 6, 2024
Merged

Conversation

Muffinman
Copy link
Contributor

As per #51223, I have updated this PR to remove the use of the global event() helper.


This PR adds are new event called PasswordResetLinkSent, which is triggered by the PasswordBroker directly after the Notification is queued.

We had a need for this ourselves, and this seemed to be the only missing event in the auth / reset chain, and seems like something that may be useful for others.

Note that it's possible to trigger your own event within the application layer at least a couple of different ways, using middleware or within a Notification event listener, but those solutions seem messy comparatively.

When looking at the other Auth related events already supported I think doing this natively makes sense.

Note: I decided not to trigger the event if $callback is passed in, since we will not know how this is handled within the callback.

@taylorotwell taylorotwell merged commit 5710fdb into laravel:11.x May 6, 2024
28 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants