Skip to content

Commit

Permalink
Fixes #111 - Add login event
Browse files Browse the repository at this point in the history
  • Loading branch information
daftspunk committed Dec 12, 2015
1 parent 2897367 commit 0578ecd
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -170,6 +170,7 @@ Here the local handler method will take priority over the **account** component'

This plugin will fire some global events that can be useful for interacting with other plugins.

- **rainlab.user.login**: The user has successfully signed in.
- **rainlab.user.deactivate**: The user has opted-out of the site by deactivating their account. This should be used to disable any content the user may want removed.
- **rainlab.user.reactivate**: The user has reactivated their own account by signing back in. This should revive the users content on the site.

Expand Down
2 changes: 2 additions & 0 deletions models/User.php
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,8 @@ public function afterLogin()
else {
parent::afterLogin();
}

Event::fire('rainlab.user.login', [$this]);
}

/**
Expand Down

0 comments on commit 0578ecd

Please sign in to comment.