Skip to content

Commit

Permalink
Add null check on user variable (#64)
Browse files Browse the repository at this point in the history
  • Loading branch information
bytehead authored Oct 23, 2023
1 parent caa330d commit c02e97f
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/FrontendHooks.php
Original file line number Diff line number Diff line change
Expand Up @@ -742,7 +742,9 @@ public static function checkLogin()
return false;
}

$User = FrontendHelperUser::getInstance();
if (!$User = FrontendHelperUser::getInstance()) {
return false;
}

if (! $User->authenticate()) {
return false;
Expand Down

0 comments on commit c02e97f

Please sign in to comment.