|
@@ -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;
|
|
|
}
|