|
@@ -149,7 +149,15 @@ class _userInfo extends pluginBase
|
|
$password = IFilter::act(IReq::get('password','post'));
|
|
$password = IFilter::act(IReq::get('password','post'));
|
|
$repassword = IFilter::act(IReq::get('repassword','post'));
|
|
$repassword = IFilter::act(IReq::get('repassword','post'));
|
|
$captcha = IFilter::act(IReq::get('captcha','post'));
|
|
$captcha = IFilter::act(IReq::get('captcha','post'));
|
|
- $_captcha = ISafe::get('captcha');
|
|
|
|
|
|
+
|
|
|
|
+ //add by Scott Chen on 2017-11-03
|
|
|
|
+ //id_type
|
|
|
|
+ $true_name = IFilter::act(IReq::get('true_name','post'));
|
|
|
|
+ $id_type = IFilter::act(IReq::get('id_type','post'));
|
|
|
|
+ $id_code = IFilter::act(IReq::get('id_code','post'));
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+ $_captcha = ISafe::get('captcha');
|
|
|
|
|
|
//获取注册配置参数
|
|
//获取注册配置参数
|
|
$siteConfig = new Config('site_config');
|
|
$siteConfig = new Config('site_config');
|
|
@@ -236,7 +244,25 @@ class _userInfo extends pluginBase
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
|
|
- //插入user表
|
|
|
|
|
|
+ //add by Scott Chen on 2017-11-03
|
|
|
|
+ //id_type
|
|
|
|
+ if ($id_type != "1") {
|
|
|
|
+ return "证件类型目前只支持身份证";
|
|
|
|
+ }
|
|
|
|
+ if (IValidate::id_ex_18($id_code) == false) {
|
|
|
|
+ return "非法身份证号码";
|
|
|
|
+ }else{
|
|
|
|
+ $memberDB = new IQuery('member');
|
|
|
|
+ $memberDB->setWhere(" id_type='" . $id_type . "' and id_code='" . $id_code . "'");
|
|
|
|
+ $memberRow = $memberDB->find();
|
|
|
|
+ if($memberRow)
|
|
|
|
+ {
|
|
|
|
+ return "证件类型为身份证, 证件号码为: ". $id_code . ", 已经被注册";
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+ //插入user表
|
|
$userArray = array(
|
|
$userArray = array(
|
|
'username' => $username,
|
|
'username' => $username,
|
|
'password' => md5($password),
|
|
'password' => md5($password),
|
|
@@ -256,6 +282,9 @@ class _userInfo extends pluginBase
|
|
'status' => $reg_option == 1 ? 3 : 1,
|
|
'status' => $reg_option == 1 ? 3 : 1,
|
|
'mobile' => $mobile,
|
|
'mobile' => $mobile,
|
|
'email' => $email,
|
|
'email' => $email,
|
|
|
|
+ 'true_name' => $true_name,
|
|
|
|
+ 'id_type' => $id_type,
|
|
|
|
+ 'id_code' => $id_code
|
|
);
|
|
);
|
|
$memberObj = new IModel('member');
|
|
$memberObj = new IModel('member');
|
|
$memberObj->setData($memberArray);
|
|
$memberObj->setData($memberArray);
|