diff --git a/Application/Sdk/Controller/UserController.class.php b/Application/Sdk/Controller/UserController.class.php index 32884ca5..501f7392 100644 --- a/Application/Sdk/Controller/UserController.class.php +++ b/Application/Sdk/Controller/UserController.class.php @@ -790,6 +790,13 @@ class UserController extends BaseController #实例化用户接口 $userApi = new MemberApi(); + 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位数字或字母"); + } // 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']); @@ -2344,6 +2351,12 @@ class UserController extends BaseController if (empty($game_source)) { $game_source['source_version'] = 0; } + // 客户端传参0原包 不提示更新 source_version程序版本号 + if($request['source_version'] == 0) { + echo base64_encode(json_encode(array('code' => 200, 'msg' => '请求成功', 'data' => []))); + exit(); + } + $data['is_force_update'] = $game_info['is_force_update']; $data['source_version'] = $game_source['source_version']; $data['update_tips'] = '游戏已经更新,请下载最新游戏包~';