generated from liutk/owl-admin-base
Fix
parent
ee6b2b46ae
commit
9aaf69ec6d
|
|
@ -27,7 +27,7 @@ class AccessTokenController extends Controller
|
||||||
|
|
||||||
$adminUser = AdminUser::where('username', $validated['username'])->first();
|
$adminUser = AdminUser::where('username', $validated['username'])->first();
|
||||||
|
|
||||||
if (! Hash::check($validated['password'], (string) $adminUser?->password)) {
|
if (is_null($adminUser?->password) || ! Hash::check($validated['password'], $adminUser->password)) {
|
||||||
throw ValidationException::withMessages([
|
throw ValidationException::withMessages([
|
||||||
'username' => ['账号或密码错误'],
|
'username' => ['账号或密码错误'],
|
||||||
]);
|
]);
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue