This commit is contained in:
root 2020-01-20 14:47:36 +08:00
parent c027c1127b
commit 75e91b281c

View File

@ -24,6 +24,10 @@ class LoginController extends Controller
abort(500, '用户名或密码错误');
}
if (!$user->enable) {
abort(500, '该账户已被停止使用');
}
$request->session()->put('email', $user->email);
$request->session()->put('id', $user->id);
if ($user->is_admin) {
@ -66,6 +70,9 @@ class LoginController extends Controller
if (!$user) {
abort(500, '用户不存在');
}
if (!$user->enable) {
abort(500, '该账户已被停止使用');
}
$request->session()->put('email', $user->email);
$request->session()->put('id', $user->id);
if ($user->is_admin) {