|
|
|
@ -514,6 +514,16 @@ class MemberController extends ThinkController
|
|
|
|
|
/* 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('请输入正确的身份证号码');
|
|
|
|
|
}*/
|
|
|
|
|
if ($data['age_status'] == 2 || $data['age_status'] == 3) {
|
|
|
|
|
$user = A('User', 'Event');
|
|
|
|
|
$userInfo = $user->user_entity($id);
|
|
|
|
|
if (empty($userInfo['real_name'])) {
|
|
|
|
|
$this->error('真实姓名不能为空');
|
|
|
|
|
}
|
|
|
|
|
if (empty($userInfo['idcard'])) {
|
|
|
|
|
$this->error('身份证号不能为空');
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
$res = $member->updateInfo($data);
|
|
|
|
|
if ($res !== false) {
|
|
|
|
@ -713,7 +723,10 @@ class MemberController extends ThinkController
|
|
|
|
|
|
|
|
|
|
public function changephone()
|
|
|
|
|
{
|
|
|
|
|
if (preg_match('/^[1][3578][0-9]{9}/', $_POST['phone'])) {
|
|
|
|
|
if (strlen($_POST['phone']) != 11) {
|
|
|
|
|
$this->ajaxReturn(array("status" => 0, "msg" => "手机长度有误"));
|
|
|
|
|
}
|
|
|
|
|
if (preg_match('/^[1][0-9]{10}$/', $_POST['phone'])) {
|
|
|
|
|
//重复判断
|
|
|
|
|
$where['phone'] = $_POST['phone'];
|
|
|
|
|
$user = M('User', 'tab_')->where($where)->field('id,account')->find();
|
|
|
|
|