mirror of
https://github.com/Poniverse/Pony.fm.git
synced 2024-11-22 04:58:01 +01:00
Log attempts to sign into disabled accounts.
This commit is contained in:
parent
7d18c8745f
commit
d2193954a8
1 changed files with 2 additions and 0 deletions
|
@ -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();
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue