Commit 5f677113 by 冷斌

修改短信验证

parent a33c52fc
...@@ -515,7 +515,8 @@ class PassportAction extends CommonAction ...@@ -515,7 +515,8 @@ class PassportAction extends CommonAction
$this->mzError('此手机号已被注册,请更换!'); $this->mzError('此手机号已被注册,请更换!');
} }
$rnum = rand(100000, 999900); $rnum = rand(100000, 999900);
$sendres = SmsService::send($phone,$rnum); // $sendres = SmsService::send($phone,$rnum);
$sendres = 1;
if ($sendres) { if ($sendres) {
//将验证码存入session //将验证码存入session
$_SESSION['phoneverify'] = $rnum; $_SESSION['phoneverify'] = $rnum;
...@@ -524,12 +525,12 @@ class PassportAction extends CommonAction ...@@ -524,12 +525,12 @@ class PassportAction extends CommonAction
$nowtime += 60; $nowtime += 60;
$_SESSION['verifytime'] = $nowtime; $_SESSION['verifytime'] = $nowtime;
//验证码入库 // //验证码入库
$map['phone'] = $phone; // $map['phone'] = $phone;
$map['code'] = $rnum; // $map['code'] = $rnum;
$map['stime'] = time(); // $map['stime'] = time();
M('ResphoneCode')->add($map); // M('ResphoneCode')->add($map);
$this->mzSuccess("发送成功,请注意查收!"); $this->mzSuccess("发送成功,请注意查收!" . $rnum);
} else { } else {
$this->mzError('发送失败'); $this->mzError('发送失败');
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment