@ -3,6 +3,7 @@
namespace Admin\Controller;
use Sdk\Controller\AgeController;
use Think\Log;
use User\Api\MemberApi as MemberApi;
use Org\WeixinSDK\Weixin;
@ -937,11 +938,31 @@ class MemberController extends ThinkController
}
}
public function changeprelname()
{
if (preg_match('/^([\xe4-\xe9][\x80-\xbf]{2}){2,4}$/', $_POST['real_name'])) {
//重复判断
$map['id'] = $_POST['id'];
$pro = M("User", "tab_")
->where($map)
->setField('real_name', $_POST['real_name']);
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 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'];
// $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'] . ")绑定"));