chenhao пре 4 година
родитељ
комит
a2480b3756
1 измењених фајлова са 4 додато и 4 уклоњено
  1. 4 4
      application/api/controller/User.php

+ 4 - 4
application/api/controller/User.php

@@ -115,10 +115,10 @@ class User extends Api
         if ($mobile && !Validate::regex($mobile, "^1\d{10}$")) {
             $this->error(__('Mobile is incorrect'));
         }
-//        $ret = Sms::check($mobile, $code, 'register');
-//        if (!$ret) {
-//            $this->error('验证码出错 ');
-//        }
+        $ret = session($mobile);
+        if (!$ret || $ret != $code) {
+            $this->error(__('Captcha is incorrect'));
+        }
         if (!$group_id) {
             $group_id = 0;
         }