From 00b5e380cf0f19701abc7f699ee3b0bf4006fb8e Mon Sep 17 00:00:00 2001 From: Jing Li Date: Wed, 1 May 2024 16:02:07 +0800 Subject: [PATCH] Update --- app/Admin/Services/System/AdminUserService.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/app/Admin/Services/System/AdminUserService.php b/app/Admin/Services/System/AdminUserService.php index 2328fbc..9918855 100644 --- a/app/Admin/Services/System/AdminUserService.php +++ b/app/Admin/Services/System/AdminUserService.php @@ -116,9 +116,13 @@ class AdminUserService extends BaseService admin_abort(__('admin.admin_user.password_confirmation')); } + if (strlen($password) < 6) { + admin_abort(__('admin.admin_user.password_confirmation')); + } + if ($id) { if (! Arr::get($data, 'old_password')) { - admin_abort(__('admin.admin_user.old_password_required')); + admin_abort('密码长度至少6个字符'); } $oldPassword = $this->query()->where('id', $id)->value('password');