|
|
|
@ -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", "连接接口失败");
|
|
|
|
|