Skip to content
This repository has been archived by the owner on Jul 16, 2021. It is now read-only.

[Proposal] Add Illuminate\Auth\Events\Registered event #197

Closed
lukasoppermann opened this issue Sep 10, 2016 · 3 comments
Closed

[Proposal] Add Illuminate\Auth\Events\Registered event #197

lukasoppermann opened this issue Sep 10, 2016 · 3 comments

Comments

@lukasoppermann
Copy link

lukasoppermann commented Sep 10, 2016

I think it would be very good, if Laravel would ship with an Illuminate\Auth\Events\Registered event. It would fit very well with the other Auth events, like login, and lockedout.

It would be very useful for sending welcoming emails to members who singed in and other related stuff.

Why add it to the core and not implemented as a user?
The main benefit of adding it to the framework would be, that packages can rely upon it.

For example this package: https://github.com/jrean/laravel-user-verification#example needs to ask the user to add 2 traits and some code to the RegisterController.

If there was an event the package could encapsulate all the logic and the user would have an easier time setting it up, as well as upgrading to new Laravel versions (if they require an update to the RegisterController).

@brayniverse
Copy link

brayniverse commented Sep 10, 2016

I've often wanted this myself. Though I would propose using past tense instead, because it would follow the event naming convention set by the framework.

The convention seems to be either something is happening (e.g. Attempting) or something has happened (e.g. Authenticated), and in the context of a user has signed up Registered makes more sense.

I'd be happy to prepare a PR with these changes either tonight or tomorrow. Unless anybody provides a decent argument against it.

@lukasoppermann
Copy link
Author

lukasoppermann commented Sep 10, 2016

Sure, I only read the login Name, but of course the event should follow the naming convention, I totally agree. I changed it now.

@lukasoppermann lukasoppermann changed the title [Proposal] Add Illuminate\Auth\Events\Register event [Proposal] Add Illuminate\Auth\Events\Registered event Sep 10, 2016
@brayniverse
Copy link

My PR was merged so we can close this issue whenever you're ready.

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

No branches or pull requests

3 participants