edenspiekermann / craft-jwt-auth

Enable authentication to Craft through the use of Javascript Web Tokens (JWT)
MIT License
5 stars 16 forks source link

avoid a "not an object" exception where the user is still null after … #16

Closed alexpcoleman closed 2 years ago

alexpcoleman commented 3 years ago

…all checks

Description

When it got to the end of EVENT_INIT code, if $user was still null at that point, the $user->id was throwing a "not an object" exception; just add an additional check before that to confirm $user is not null.

Definition of Done

alexpcoleman commented 3 years ago

I just hotfixed off master as this is a tiny addition.