密码必须6-15位数字与字母组合

master
tpingzhang 5 years ago
parent 24cd29761a
commit 18bc52c0ff

@ -832,11 +832,8 @@ class UserController extends BaseController
#实例化用户接口
$userApi = new MemberApi();
/* if(!preg_match('/^[0-9a-zA-Z]{6,15}$/', $user['account'])){
if(!preg_match('/^[0-9a-zA-Z]{6,15}$/', $user['account'])){
$this -> set_message(1027, "fail", "账号必须6-15位数字或字母组合");
} */
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'])){
@ -850,9 +847,10 @@ class UserController extends BaseController
$result = $userApi -> sdk_register_($user['account'], $user['password'], 1, 7, $user['promote_id'], get_promote_name($user['promote_id']), '', $user["game_id"], get_game_name($user["game_id"]), $user['sdk_version'] ,$user['device_type'],$user['unique_code']);
} else {//用户1
if(!preg_match('/^(?![^a-zA-Z]+$)(?!\D+$).{6,15}$/', $user['account'])){
$this -> set_message(1027, "fail", "账号必须6-15位数字与字母组合");
}
$result = $userApi -> sdk_register_($user['account'], $user['password'], 1, 1, $user['promote_id'], get_promote_name($user['promote_id']), $phone = "", $user["game_id"], get_game_name($user["game_id"]), $user['sdk_version'] ,$user['device_type'],$user['unique_code']);
}
$res_msg = array();
if ($result > 0) {

Loading…
Cancel
Save