手机号码重复验证

master
zhengyongxing 5 years ago
parent 57903e8a13
commit 45d124b4cd

@ -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']);

Loading…
Cancel
Save