Skip to content

Commit 8a85da5

Browse files
committed
return null if there is no id
1 parent 81c4071 commit 8a85da5

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/MsGraph.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -219,6 +219,10 @@ public function getTokenData(?string $id = null): ?MsGraphToken
219219
{
220220
$id = $this->getUserId($id);
221221

222+
if ($id === null) {
223+
return null;
224+
}
225+
222226
return MsGraphToken::where('user_id', $id)->where('refresh_token', '<>', '')->first();
223227
}
224228

0 commit comments

Comments
 (0)