Skip to content

Commit 2cdf8fe

Browse files
committed
Fix null user
1 parent ad0977b commit 2cdf8fe

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,3 +3,5 @@ tags
33
vendor
44
composer.lock
55
phpunit.xml
6+
.DS_Store
7+

src/Middleware/IsVerified.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ class IsVerified
2222
*/
2323
public function handle($request, Closure $next)
2424
{
25-
if( ! $request->user()->verified){
25+
if( !is_null($request->user()) && !$request->user()->verified){
2626
throw new UserNotVerifiedException;
2727
}
2828

0 commit comments

Comments
 (0)