|
|
|
@ -62,11 +62,11 @@ class AuthController extends Controller |
|
|
|
$user = AdminUsers::where('username', $request->username)->first(); |
|
|
|
|
|
|
|
if (!$user || !Hash::check($request->password, $user->password)) { |
|
|
|
throw new CustomException(__('validation.auth.u_p_error'), 401); |
|
|
|
throw new CustomException(__('validation.auth.u_p_error'), 400); |
|
|
|
} |
|
|
|
|
|
|
|
if ($user->status !== 1) { |
|
|
|
throw new CustomException(__('validation.auth.u_disabled'), 403); |
|
|
|
throw new CustomException(__('validation.auth.u_disabled'), 400); |
|
|
|
} |
|
|
|
|
|
|
|
// 删除旧token |
|
|
|
|