Skip to content

Commit

Permalink
Update LaravelMixpanelEventHandler.php
Browse files Browse the repository at this point in the history
  • Loading branch information
mikebronner committed Jan 16, 2016
1 parent 2e14629 commit 4882cf5
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions src/Listeners/LaravelMixpanelEventHandler.php
Original file line number Diff line number Diff line change
Expand Up @@ -51,8 +51,9 @@ public function onUserLoginAttempt(Attempting $event)
/**
* @param Model $user
*/
public function onUserLogin(Login $user)
public function onUserLogin(Login $login)
{
$user = $login->user;
$firstName = $user->first_name;
$lastName = $user->last_name;

Expand Down Expand Up @@ -81,8 +82,10 @@ public function onUserLogin(Login $user)
/**
* @param Model $user
*/
public function onUserLogout(Logout $user = null)
public function onUserLogout(Logout $logout)
{
$user = $logout->user;

if ($user) {
$this->mixPanel->identify($user->getKey());
}
Expand Down

0 comments on commit 4882cf5

Please sign in to comment.