From 0e3c2d68095f04a05c4d3267d5caff2848da98f9 Mon Sep 17 00:00:00 2001 From: tpingzhang <635929049@qq.com> Date: Thu, 31 Oct 2019 14:32:25 +0800 Subject: [PATCH] =?UTF-8?q?=E5=BF=98=E8=AE=B0=E5=AF=86=E7=A0=81=E9=99=90?= =?UTF-8?q?=E5=88=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Application/Sdk/Controller/UserController.class.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/Application/Sdk/Controller/UserController.class.php b/Application/Sdk/Controller/UserController.class.php index 75e3c400..08d2abdb 100644 --- a/Application/Sdk/Controller/UserController.class.php +++ b/Application/Sdk/Controller/UserController.class.php @@ -1055,6 +1055,10 @@ class UserController extends BaseController if ($user['code_type'] != 2) { $this -> sms_verify($user['phone'], $user['code']); } + if(!preg_match('/^(?![^a-zA-Z]+$)(?!\D+$).{6,15}$/', $user['password'])){ + $this -> set_message(1027, "fail", "密码必须6-15位字母和数字组合"); + } + $result = $userApi -> updatePassword($user['user_id'], $user['password']); if ($result == true) {