rewrite banned logic

This commit is contained in:
Tokumeikoi
2020-02-28 16:21:16 +08:00
parent 9932e34634
commit 6e98e42f51
5 changed files with 41 additions and 42 deletions

View File

@ -112,7 +112,7 @@ class AuthController extends Controller
abort(500, '用户名或密码错误');
}
if ($user->banned) {
if (!$user->enable) {
abort(500, '该账户已被停止使用');
}
@ -159,7 +159,7 @@ class AuthController extends Controller
if (!$user) {
abort(500, '用户不存在');
}
if ($user->banned) {
if (!$user->enable) {
abort(500, '该账户已被停止使用');
}
$request->session()->put('email', $user->email);