main
Jing Li 2024-03-23 10:31:59 +08:00
parent a29abff979
commit d4484633cb
1 changed files with 3 additions and 2 deletions

View File

@ -6,7 +6,6 @@ use Slowlyo\OwlAdmin\Admin;
use Illuminate\Http\Request;
use Illuminate\Support\Facades\Validator;
use Symfony\Component\HttpFoundation\Response;
use Slowlyo\OwlAdmin\Models\AdminUser;
use Slowlyo\OwlAdmin\Controllers\AuthController as AdminAuthController;
use Illuminate\Support\Facades\Hash;
@ -36,8 +35,10 @@ class AuthController extends AdminAuthController
if ($validator->fails()) {
abort(Response::HTTP_BAD_REQUEST, $validator->errors()->first());
}
$adminModel = Admin::config("admin.auth.model", AdminUser::class);
$adminModel = Admin::adminUserModel();
$user = $adminModel::query()->where('username', $request->username)->first();
if($user && $user->lock){
abort(Response::HTTP_BAD_REQUEST, '您的账号已被锁定,需要联系超级管理员解锁。');
}else{