From 1451a7a0fac60b08f2e8739f2340aeddc935e92f Mon Sep 17 00:00:00 2001 From: Ying Date: Sun, 6 Aug 2023 10:09:06 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E4=BF=AE=E5=A4=8D=E5=90=8E=E5=8F=B0?= =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E4=BC=9A=E5=91=98=E5=AF=86=E7=A0=81=E6=9C=AA?= =?UTF-8?q?=E5=8A=A0=E5=AF=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/admin/service/UserService.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/app/admin/service/UserService.php b/app/admin/service/UserService.php index 7783c52..b5d92c8 100644 --- a/app/admin/service/UserService.php +++ b/app/admin/service/UserService.php @@ -87,6 +87,9 @@ class UserService if(!empty($data)) { throw new OperateException('该用户ID或邮箱已经存在!'); } + // 密码加密 + $params['salt'] = Random::alpha(); + $params['pwd'] = encryptPwd($params['pwd'],$params['salt']); Db::startTrans(); try {