18 lines
371 B
PHP
18 lines
371 B
PHP
<?php
|
|
|
|
namespace App\Domains\Account\Handler;
|
|
|
|
use App\Exceptions\AuthException;
|
|
|
|
class AuthAdminCheckAccount
|
|
{
|
|
public function handle($account, $request)
|
|
{
|
|
// 已禁用
|
|
if ($account->status == 2) {
|
|
app('auth:admin')->logout();
|
|
throw new AuthException('账号被禁用', AuthException::ACCOUNT_DISABLED);
|
|
}
|
|
}
|
|
}
|