From 24cd29761a6198ae7f9f697862ee93d9d9f3ef6b Mon Sep 17 00:00:00 2001 From: tpingzhang <635929049@qq.com> Date: Fri, 15 Nov 2019 18:18:30 +0800 Subject: [PATCH] =?UTF-8?q?=E5=AF=86=E7=A0=81=E5=BF=85=E9=A1=BB6-15?= =?UTF-8?q?=E4=BD=8D=E6=95=B0=E5=AD=97=E4=B8=8E=E5=AD=97=E6=AF=8D=E7=BB=84?= =?UTF-8?q?=E5=90=88?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Application/Sdk/Controller/UserController.class.php | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/Application/Sdk/Controller/UserController.class.php b/Application/Sdk/Controller/UserController.class.php index a9dfd377..ff8e32a5 100644 --- a/Application/Sdk/Controller/UserController.class.php +++ b/Application/Sdk/Controller/UserController.class.php @@ -832,12 +832,15 @@ class UserController extends BaseController #实例化用户接口 $userApi = new MemberApi(); - if(!preg_match('/^[0-9a-zA-Z]{6,15}$/', $user['account'])){ + /* if(!preg_match('/^[0-9a-zA-Z]{6,15}$/', $user['account'])){ $this -> set_message(1027, "fail", "账号必须6-15位数字或字母组合"); + } */ + if(!preg_match('/^(?![^a-zA-Z]+$)(?!\D+$).{6,15}$/', $user['account'])){ + $this -> set_message(1027, "fail", "账号必须6-15位数字与字母组合"); } if(!preg_match('/^(?![^a-zA-Z]+$)(?!\D+$).{6,15}$/', $user['password'])){ - $this -> set_message(1027, "fail", "密码必须6-15位数字或字母组合"); + $this -> set_message(1027, "fail", "密码必须6-15位数字与字母组合"); } // user表加game_id if ($type == 2) {//手机2