|
|
@ -793,25 +793,29 @@ class MemberController extends ThinkController
|
|
|
|
|
|
|
|
|
|
|
|
public function changeprelname()
|
|
|
|
public function changeprelname()
|
|
|
|
{
|
|
|
|
{
|
|
|
|
if (preg_match('/^([\xe4-\xe9][\x80-\xbf]{2}){2,4}$/', $_POST['real_name'])) {
|
|
|
|
$realName = trim($_POST['real_name']);
|
|
|
|
//重复判断
|
|
|
|
if (strpos($realName, '·') === false) {
|
|
|
|
$map['id'] = $_POST['id'];
|
|
|
|
if (!preg_match('/^([\xe4-\xe9][\x80-\xbf]{2}){2,4}$/', $realName)) {
|
|
|
|
$pro = M("User", "tab_")
|
|
|
|
$this->ajaxReturn(array("status" => 0, "msg" => "真实姓名输入错误"));
|
|
|
|
->where($map)
|
|
|
|
return;
|
|
|
|
->setField('real_name', $_POST['real_name']);
|
|
|
|
|
|
|
|
if ($pro !== false) {
|
|
|
|
|
|
|
|
addOperationLog(array(
|
|
|
|
|
|
|
|
"op_type"=>1,
|
|
|
|
|
|
|
|
"key"=>get_user_account($_POST['id']).'的真实姓名修改为:'.$_POST['real_name'],
|
|
|
|
|
|
|
|
"url"=>U("Member/edit",array("id"=>$_POST['id'])),
|
|
|
|
|
|
|
|
"menu"=>"用户-玩家组-玩家列表-编辑-真实姓名修改",
|
|
|
|
|
|
|
|
));
|
|
|
|
|
|
|
|
$this->ajaxReturn(array("status" => 1, "msg" => "真实姓名修改成功"));
|
|
|
|
|
|
|
|
} else {
|
|
|
|
|
|
|
|
$this->ajaxReturn(array("status" => 0, "msg" => "真实姓名修改失败"));
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//重复判断
|
|
|
|
|
|
|
|
$map['id'] = $_POST['id'];
|
|
|
|
|
|
|
|
$pro = M("User", "tab_")
|
|
|
|
|
|
|
|
->where($map)
|
|
|
|
|
|
|
|
->setField('real_name', $realName);
|
|
|
|
|
|
|
|
if ($pro !== false) {
|
|
|
|
|
|
|
|
addOperationLog(array(
|
|
|
|
|
|
|
|
"op_type"=>1,
|
|
|
|
|
|
|
|
"key"=>get_user_account($_POST['id']).'的真实姓名修改为:'.$realName,
|
|
|
|
|
|
|
|
"url"=>U("Member/edit",array("id"=>$_POST['id'])),
|
|
|
|
|
|
|
|
"menu"=>"用户-玩家组-玩家列表-编辑-真实姓名修改",
|
|
|
|
|
|
|
|
));
|
|
|
|
|
|
|
|
$this->ajaxReturn(array("status" => 1, "msg" => "真实姓名修改成功"));
|
|
|
|
} else {
|
|
|
|
} else {
|
|
|
|
$this->ajaxReturn(array("status" => 0, "msg" => "真实姓名输入错误"));
|
|
|
|
$this->ajaxReturn(array("status" => 0, "msg" => "真实姓名修改失败"));
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|