mirror of
https://github.com/BookStackApp/BookStack.git
synced 2024-11-23 02:00:26 +08:00
Applied styleci changes
This commit is contained in:
parent
2740603d99
commit
8f12c8bc99
|
@ -26,12 +26,12 @@ class CheckEmailConfirmed
|
||||||
$this->confirmationService = $confirmationService;
|
$this->confirmationService = $confirmationService;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Handle an incoming request.
|
* Handle an incoming request.
|
||||||
*
|
*
|
||||||
* @param \Illuminate\Http\Request $request
|
* @param \Illuminate\Http\Request $request
|
||||||
* @param \Closure $next
|
* @param \Closure $next
|
||||||
|
*
|
||||||
* @return mixed
|
* @return mixed
|
||||||
*/
|
*/
|
||||||
public function handle($request, Closure $next)
|
public function handle($request, Closure $next)
|
||||||
|
@ -40,6 +40,7 @@ class CheckEmailConfirmed
|
||||||
$user = auth()->user();
|
$user = auth()->user();
|
||||||
if (auth()->check() && !$user->email_confirmed && $this->confirmationService->confirmationRequired()) {
|
if (auth()->check() && !$user->email_confirmed && $this->confirmationService->confirmationRequired()) {
|
||||||
auth()->logout();
|
auth()->logout();
|
||||||
|
|
||||||
return redirect()->to('/');
|
return redirect()->to('/');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -470,7 +470,7 @@ class AuthTest extends BrowserKitTest
|
||||||
$this->assertTrue(auth()->check());
|
$this->assertTrue(auth()->check());
|
||||||
|
|
||||||
$this->get('/books');
|
$this->get('/books');
|
||||||
$this->assertRedirectedTo("/");
|
$this->assertRedirectedTo('/');
|
||||||
|
|
||||||
$this->assertFalse(auth()->check());
|
$this->assertFalse(auth()->check());
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user