Skip to content
This repository was archived by the owner on May 7, 2019. It is now read-only.

Commit ada8cf6

Browse files
Fix API error when no session is available
1 parent 0e2b5d4 commit ada8cf6

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

app/Http/Middleware/ApiAuthenticate.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ public function handle(Request $request, Closure $next)
4848
return response()->json(['invalid_api_key'], StatusCode::UNAUTHORIZED);
4949
}
5050

51-
if (config('upste.require_email_verification') && !$request->user()->confirmed) {
51+
if (config('upste.require_email_verification') && !$user->confirmed) {
5252
return response()->json(['email_not_confirmed'], StatusCode::UNAUTHORIZED);
5353
}
5454

0 commit comments

Comments
 (0)