Skip to content

Commit

Permalink
Applied styleci changes
Browse files Browse the repository at this point in the history
  • Loading branch information
ssddanbrown committed Aug 30, 2021
1 parent 2740603 commit 8f12c8b
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
7 changes: 4 additions & 3 deletions app/Http/Middleware/CheckEmailConfirmed.php
Expand Up @@ -26,12 +26,12 @@ public function __construct(EmailConfirmationService $confirmationService)
$this->confirmationService = $confirmationService;
}


/**
* Handle an incoming request.
*
* @param \Illuminate\Http\Request $request
* @param \Closure $next
* @param \Illuminate\Http\Request $request
* @param \Closure $next
*
* @return mixed
*/
public function handle($request, Closure $next)
Expand All @@ -40,6 +40,7 @@ public function handle($request, Closure $next)
$user = auth()->user();
if (auth()->check() && !$user->email_confirmed && $this->confirmationService->confirmationRequired()) {
auth()->logout();

return redirect()->to('/');
}

Expand Down
2 changes: 1 addition & 1 deletion tests/Auth/AuthTest.php
Expand Up @@ -470,7 +470,7 @@ public function test_logged_in_user_with_unconfirmed_email_is_logged_out()
$this->assertTrue(auth()->check());

$this->get('/books');
$this->assertRedirectedTo("/");
$this->assertRedirectedTo('/');

$this->assertFalse(auth()->check());
}
Expand Down

0 comments on commit 8f12c8b

Please sign in to comment.