From d2193954a8088f0586f2dd13bb40f6698a32bd0e Mon Sep 17 00:00:00 2001 From: Peter Deltchev Date: Thu, 29 Dec 2016 20:28:52 -0800 Subject: [PATCH] Log attempts to sign into disabled accounts. --- app/Http/Middleware/DisabledAccountCheck.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/app/Http/Middleware/DisabledAccountCheck.php b/app/Http/Middleware/DisabledAccountCheck.php index 3c8e8ef9..63dff854 100644 --- a/app/Http/Middleware/DisabledAccountCheck.php +++ b/app/Http/Middleware/DisabledAccountCheck.php @@ -22,6 +22,7 @@ namespace Poniverse\Ponyfm\Http\Middleware; use Closure; use Illuminate\Contracts\Auth\Guard; +use Log; class DisabledAccountCheck { @@ -60,6 +61,7 @@ class DisabledAccountCheck && $this->auth->user()->disabled_at !== null && !($request->getMethod() === 'POST' && $request->getRequestUri() == '/auth/logout') ) { + Log::info("A login was attempted to a disabled account, user ID #{$this->auth->user()->id}."); $this->auth->logout(); }