管理后台-用户组-玩家列表敏感信息加密显示

master
zhengchanglong 5 years ago
parent de4aea8cad
commit a55efe582b

@ -494,9 +494,9 @@ class MemberController extends ThinkController
$this->error('请填写正确的名字');
}
if (!empty($data['idcard']) && !preg_match('/^[1-9]\d{7}((0\d)|(1[0-2]))(([0|1|2]\d)|3[0-1])\d{3}$|^[1-9]\d{5}[1-9]\d{3}((0\d)|(1[0-2]))(([0|1|2]\d)|3[0-1])\d{3}([0-9]|X)$/', $data['idcard'])) {
/* if (!empty($data['idcard']) && !preg_match('/^[1-9]\d{7}((0\d)|(1[0-2]))(([0|1|2]\d)|3[0-1])\d{3}$|^[1-9]\d{5}[1-9]\d{3}((0\d)|(1[0-2]))(([0|1|2]\d)|3[0-1])\d{3}([0-9]|X)$/', $data['idcard'])) {
$this->error('请输入正确的身份证号码');
}
}*/
$res = $member->updateInfo($data);
if ($res !== false) {
@ -712,6 +712,30 @@ class MemberController extends ThinkController
}
}
public function changepidcard()
{
if (preg_match('/^[1-9]\d{7}((0\d)|(1[0-2]))(([0|1|2]\d)|3[0-1])\d{3}$|^[1-9]\d{5}[1-9]\d{3}((0\d)|(1[0-2]))(([0|1|2]\d)|3[0-1])\d{3}([0-9]|X)$/', $_POST['idcard'])) {
//重复判断
$where['idcard'] = $_POST['idcard'];
/*$user = M('User', 'tab_')->where($where)->field('id,account')->find();
if ($user) {
$this->ajaxReturn(array("status" => 0, "msg" => "该身份证号码已被" . $user['account'] . "(" . $user['id'] . ")绑定"));
}*/
$map['id'] = $_POST['id'];
$pro = M("User", "tab_")
->where($map)
->setField('idcard', $_POST['idcard']);
if ($pro !== false) {
$this->ajaxReturn(array("status" => 1, "msg" => "身份证号码修改成功"));
} else {
$this->ajaxReturn(array("status" => 0, "msg" => "身份证号码修改失败"));
}
} else {
$this->ajaxReturn(array("status" => 0, "msg" => "请输入正确的身份证号码"));
}
}
public function denglu($p = 1)
{
$map['user_id'] = $_REQUEST['id'];

Loading…
Cancel
Save