mirror of
https://github.com/Poniverse/Pony.fm.git
synced 2024-11-25 14:37:59 +01:00
#29: This works because the only disabled accounts right now are merged ones.
This commit is contained in:
parent
a9bc69ec02
commit
3b1fa792cf
1 changed files with 5 additions and 1 deletions
|
@ -53,11 +53,15 @@ class DisabledAccountCheck
|
|||
*/
|
||||
public function handle($request, Closure $next)
|
||||
{
|
||||
// TODO: don't automatically log the user out some time after
|
||||
// issue #29 is fixed or when disabled_at starts being used for
|
||||
// something other than merged accounts.
|
||||
if ($this->auth->check()
|
||||
&& $this->auth->user()->disabled_at !== null
|
||||
&& !($request->getMethod() === 'POST' && $request->getRequestUri() == '/auth/logout')
|
||||
){
|
||||
return Response::view('home.account-disabled', ['username' => $this->auth->user()->username], 403);
|
||||
$this->auth->logout();
|
||||
// return Response::view('home.account-disabled', ['username' => $this->auth->user()->username], 403);
|
||||
}
|
||||
|
||||
return $next($request);
|
||||
|
|
Loading…
Reference in a new issue