This commit is contained in:
Tokumeikoi
2020-03-02 20:29:17 +08:00
parent c8cb1f8e83
commit 47686d50c5
6 changed files with 48 additions and 60 deletions

View File

@ -8,7 +8,7 @@ class UserService
{
public function isAvailable(User $user)
{
if ($user->enable && $user->transfer_enable && ($user->expired_at > time() || $user->expired_at === NULL)) {
if (!$user->banned && $user->transfer_enable && ($user->expired_at > time() || $user->expired_at === NULL)) {
return true;
}
return false;
@ -21,19 +21,7 @@ class UserService
$query->where('expired_at', '>=', time())
->orWhere('expired_at', NULL);
})
->where('enable', 1)
->select([
'id',
'email',
't',
'u',
'd',
'transfer_enable',
'enable',
'v2ray_uuid',
'v2ray_alter_id',
'v2ray_level'
])
->where('banned', 0)
->get();
}