diff --git a/Application/Sdk/Controller/UserController.class.php b/Application/Sdk/Controller/UserController.class.php index e5a8a0aa..0e0fa05b 100644 --- a/Application/Sdk/Controller/UserController.class.php +++ b/Application/Sdk/Controller/UserController.class.php @@ -834,10 +834,12 @@ class UserController extends BaseController #实例化用户接口 $userApi = new MemberApi(); - - if(!preg_match('/^[0-9a-zA-Z]{6,12}$/', $user['password'])){ + if(strlen($user['password']) > 12 || strlen($user['password']) < 6) { $this -> set_message(1027, "fail", "密码长度为6-12位"); } + if(!preg_match('/^[0-9a-zA-Z]{6,12}$/', $user['password'])) { + $this -> set_message(1027, "fail", "禁止使用特殊字符"); + } /* if(!preg_match('/^(?![^a-zA-Z]+$)(?!\D+$).{6,15}$/', $user['password'])){ $this -> set_message(1027, "fail", "6-12位字母或数字");