From 522ba685dcf0d1a0796d7112484d862b687dda7a Mon Sep 17 00:00:00 2001 From: zhanglingsheng Date: Mon, 9 Dec 2019 10:46:32 +0800 Subject: [PATCH] =?UTF-8?q?=E8=99=9A=E6=8B=9F=E6=B3=A8=E5=86=8C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../SimulationRegisterController.class.php | 31 +------------------ 1 file changed, 1 insertion(+), 30 deletions(-) diff --git a/Application/Sdk/Controller/SimulationRegisterController.class.php b/Application/Sdk/Controller/SimulationRegisterController.class.php index 34543e0a..dcf75f0f 100644 --- a/Application/Sdk/Controller/SimulationRegisterController.class.php +++ b/Application/Sdk/Controller/SimulationRegisterController.class.php @@ -38,42 +38,13 @@ class SimulationRegisterController extends Controller #获取SDK上POST方式传过来的数据 然后base64解密 然后将json字符串转化成数组 $user = I('request.'); - $user['register_type'] = 7;//模拟注册 + $user['register_type'] = 17;//模拟注册 #判断数据是否为空 if (empty($user)) { $this->set_message(1001, "fail", "注册数据不能为空"); } Log::write('mn_user_register:' . date('Y-m-d H:i:s') . ' ---- ' . json_encode($user), 'INFO'); /**是否开启ucenter**/ - if (C('UC_OPEN') == 1) { - //Ucenter注册 - //1.验证本平台是否存在账号 - $is_user_info = M('user', 'tab_')->where(['account' => $user['account']])->find(); - if (!empty($is_user_info)) { - $this->set_message(1017, "fail", "用户名已存在"); - } - //2.验证其他平台是否存在账号 - $domain = C('UC_OTHER_WEB_URL'); - if (!empty($domain)) { - $url = "http://{$domain}/Api/user/checkUserName?account={$user['account']}"; - $check_res = json_decode(file_get_contents($url), true); - if ($check_res['status'] == 0) { - $this->set_message(1017, "fail", "用户名已存在"); - } - } - //3.ucenter注册账号 - $ucresult = uc_user_checkname($user['account']); - if ($ucresult == -1) { - $this->set_message(0, "fail", "用户名不合法"); - } elseif ($ucresult == -2) { - $this->set_message(0, "fail", "包含要允许注册的词语"); - } elseif ($ucresult == -3) { - $this->set_message(1017, "fail", "用户名已存在"); - } else { - //同步ucenter注册 - cus_uc_register($user['account'], $user['password'], $user['account'] . '@vlcms.com'); - } - } $this->reg_data($user); }