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 after login event #111

Closed
wants to merge 3 commits into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
10 changes: 8 additions & 2 deletions components/Account.php
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
<?php namespace RainLab\User\Components;

use Lang;
use Auth;
use Mail;
use Event;
use Flash;
use Input;
use Lang;
use Mail;
use Request;
use Redirect;
use Validator;
Expand Down Expand Up @@ -131,6 +132,11 @@ public function onSignin()
'password' => array_get($data, 'password')
], true);

/*
* After login event
*/
Event::fire('rainlab.user.afterlogin', [$user]);

/*
* Redirect to the intended page after successful sign in
*/
Expand Down