From be6572c0b9f1be9448d32db6b71a2f90f66d5bf0 Mon Sep 17 00:00:00 2001 From: tpingzhang <635929049@qq.com> Date: Mon, 18 Nov 2019 21:55:38 +0800 Subject: [PATCH] =?UTF-8?q?=E5=AF=86=E7=A0=81=20=E8=A7=84=E6=A0=BC?= =?UTF-8?q?=E4=BF=AE=E6=94=B9=206=E5=88=B015=E4=BD=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Sdk/Controller/UserController.class.php | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) diff --git a/Application/Sdk/Controller/UserController.class.php b/Application/Sdk/Controller/UserController.class.php index 8747a602..23e5464b 100644 --- a/Application/Sdk/Controller/UserController.class.php +++ b/Application/Sdk/Controller/UserController.class.php @@ -833,12 +833,15 @@ class UserController extends BaseController #实例化用户接口 $userApi = new MemberApi(); if(!preg_match('/^[0-9a-zA-Z]{6,15}$/', $user['account'])){ - $this -> set_message(1027, "fail", "6-12位字母或数字"); + $this -> set_message(1027, "fail", "6-15位字母或数字"); } + if(!preg_match('/^[0-9a-zA-Z]{6,15}$/', $user['password'])){ + $this -> set_message(1027, "fail", "6-15位字母或数字"); + } - if(!preg_match('/^(?![^a-zA-Z]+$)(?!\D+$).{6,15}$/', $user['password'])){ + /* if(!preg_match('/^(?![^a-zA-Z]+$)(?!\D+$).{6,15}$/', $user['password'])){ $this -> set_message(1027, "fail", "6-12位字母或数字"); - } + } */ // user表加game_id if ($type == 2) {//手机2 $result = $userApi -> sdk_register_($user['account'], $user['password'], 1, 2, $user['promote_id'], get_promote_name($user['promote_id']), $user['account'], $user["game_id"], get_game_name($user["game_id"]), $user['sdk_version'] ,$user['device_type'],$user['unique_code']); @@ -945,8 +948,11 @@ class UserController extends BaseController $data['nickname'] = $user['nickname']; break; case 'pwd': - if(!preg_match('/^(?![^a-zA-Z]+$)(?!\D+$).{6,15}$/', $user['password'])){ + /* if(!preg_match('/^(?![^a-zA-Z]+$)(?!\D+$).{6,15}$/', $user['password'])){ $this -> new_set_message(1027, "密码必须6-15位字母和数字组合"); + } */ + if(!preg_match('/^[0-9a-zA-Z]{6,15}$/', $user['password'])){ + $this -> set_message(1027, "fail", "6-15位字母或数字"); } if ($user['old_password'] == $user['password']) { @@ -2070,7 +2076,6 @@ class UserController extends BaseController */ public function idcard_change() { - C(api('Config/lists')); $user = json_decode(base64_decode(file_get_contents("php://input")), true); if (empty($user['user_id']) || empty($user['idcard']) || empty($user['real_name'])) { @@ -2114,7 +2119,7 @@ class UserController extends BaseController switch ($re) { case - 1: - $this -> set_message(1067, "fail", "短信数量已经使用完!"); + $this -> set_message(1067, "fail", "数量已经使用完!"); break; case - 2: $this -> set_message(1068, "fail", "连接接口失败");