From 45d124b4cdab498c69519c8e6aebef491d9799a2 Mon Sep 17 00:00:00 2001 From: zhengyongxing Date: Mon, 27 Jul 2020 17:43:14 +0800 Subject: [PATCH] =?UTF-8?q?=E6=89=8B=E6=9C=BA=E5=8F=B7=E7=A0=81=E9=87=8D?= =?UTF-8?q?=E5=A4=8D=E9=AA=8C=E8=AF=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Application/Admin/Controller/UserController.class.php | 7 +++++++ 1 file changed, 7 insertions(+) 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']);