Skip to content

Commit 4882cf5

Browse files
committed
Update LaravelMixpanelEventHandler.php
1 parent 2e14629 commit 4882cf5

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

src/Listeners/LaravelMixpanelEventHandler.php

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -51,8 +51,9 @@ public function onUserLoginAttempt(Attempting $event)
5151
/**
5252
* @param Model $user
5353
*/
54-
public function onUserLogin(Login $user)
54+
public function onUserLogin(Login $login)
5555
{
56+
$user = $login->user;
5657
$firstName = $user->first_name;
5758
$lastName = $user->last_name;
5859

@@ -81,8 +82,10 @@ public function onUserLogin(Login $user)
8182
/**
8283
* @param Model $user
8384
*/
84-
public function onUserLogout(Logout $user = null)
85+
public function onUserLogout(Logout $logout)
8586
{
87+
$user = $logout->user;
88+
8689
if ($user) {
8790
$this->mixPanel->identify($user->getKey());
8891
}

0 commit comments

Comments
 (0)