Skip to content

Commit 66f39be

Browse files
Alexbarryvdh
authored andcommitted
Update MultiAuthCollector.php (#939)
Check if property exists
1 parent 113db72 commit 66f39be

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/DataCollector/MultiAuthCollector.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -111,9 +111,9 @@ protected function getUserInformation($user = null)
111111
$identifier = $user instanceof Authenticatable ? $user->getAuthIdentifier() : $user->id;
112112
if (is_numeric($identifier)) {
113113
try {
114-
if ($user->username) {
114+
if (isset($user->username)) {
115115
$identifier = $user->username;
116-
} elseif ($user->email) {
116+
} elseif (isset($user->email)) {
117117
$identifier = $user->email;
118118
}
119119
} catch (\Throwable $e) {

0 commit comments

Comments
 (0)