diff --git a/Application/Admin/Controller/UserController.class.php b/Application/Admin/Controller/UserController.class.php index b746bcf91..5dab9e377 100644 --- a/Application/Admin/Controller/UserController.class.php +++ b/Application/Admin/Controller/UserController.class.php @@ -380,6 +380,13 @@ class UserController extends AdminController if (!preg_match($pattern, $_POST['email'])) { $this->error('邮箱格式不正确!'); } + + if($_POST['mobile']) { + $mobile_data = M("ucenter_member")->where(['mobile'=>$_POST['mobile']])->find(); + if ($mobile_data) { + $this->error('该手机号码已经添加过!'); + } + } // if (isset($_POST['mobile']) && $_POST['mobile'] != '') { // $dx = A('Phone'); // $res = $dx->check_tel_code($_POST['mobile'], $_POST['code']);