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

[5.3] fire Authenticated event whenever $guard->setUser() is called #14946

Merged
merged 2 commits into from
Aug 22, 2016

Conversation

tomschlick
Copy link
Contributor

Related to #14834

There needs to be a way to tell when an authenticated user has been set in the request. Currently the Login event only records actual logins via form or when a remember_me token is used to setup a new session. Current session authentications have no events fired at all.

This new Authenticated event fires on every request as soon as the user is set in the auth guard allowing you to listen for that event and execute code that depends on the user being authenticated.

I can add the relevant docs if/when this is accepted.

@tomschlick tomschlick changed the title fire Authenticated event whenever $guard->setUser() is called [5.3] fire Authenticated event whenever $guard->setUser() is called Aug 22, 2016
@taylorotwell taylorotwell merged commit ad899c2 into laravel:5.3 Aug 22, 2016
@tomschlick tomschlick deleted the authenticated-event branch August 22, 2016 21:10
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