mirror of
https://gitee.com/koogua/course-tencent-cloud.git
synced 2025-06-24 12:05:39 +08:00
修正验证码关闭后台逻辑
This commit is contained in:
parent
6f679e74e9
commit
c77e1801ac
@ -53,9 +53,17 @@ class Account extends Service
|
|||||||
|
|
||||||
$validator->checkIfAllowLogin($user);
|
$validator->checkIfAllowLogin($user);
|
||||||
|
|
||||||
$validator = new CaptchaValidator();
|
$captcha = $this->getSettings('captcha');
|
||||||
|
|
||||||
$validator->checkCode($post['ticket'], $post['rand']);
|
/**
|
||||||
|
* 验证码是一次性的,放到最后检查,减少第三方调用
|
||||||
|
*/
|
||||||
|
if ($captcha['enabled'] == 1) {
|
||||||
|
|
||||||
|
$validator = new CaptchaValidator();
|
||||||
|
|
||||||
|
$validator->checkCode($post['ticket'], $post['rand']);
|
||||||
|
}
|
||||||
|
|
||||||
$this->auth->saveAuthInfo($user);
|
$this->auth->saveAuthInfo($user);
|
||||||
|
|
||||||
|
@ -23,9 +23,14 @@ class MailCode extends LogicService
|
|||||||
|
|
||||||
$post['email'] = $validator->checkEmail($post['email']);
|
$post['email'] = $validator->checkEmail($post['email']);
|
||||||
|
|
||||||
$validator = new CaptchaValidator();
|
$captcha = $this->getSettings('captcha');
|
||||||
|
|
||||||
$validator->checkCode($post['ticket'], $post['rand']);
|
if ($captcha['enabled'] == 1) {
|
||||||
|
|
||||||
|
$validator = new CaptchaValidator();
|
||||||
|
|
||||||
|
$validator->checkCode($post['ticket'], $post['rand']);
|
||||||
|
}
|
||||||
|
|
||||||
$service = new MailVerifyService();
|
$service = new MailVerifyService();
|
||||||
|
|
||||||
|
@ -23,9 +23,14 @@ class SmsCode extends LogicService
|
|||||||
|
|
||||||
$post['phone'] = $validator->checkPhone($post['phone']);
|
$post['phone'] = $validator->checkPhone($post['phone']);
|
||||||
|
|
||||||
$validator = new CaptchaValidator();
|
$captcha = $this->getSettings('captcha');
|
||||||
|
|
||||||
$validator->checkCode($post['ticket'], $post['rand']);
|
if ($captcha['enabled'] == 1) {
|
||||||
|
|
||||||
|
$validator = new CaptchaValidator();
|
||||||
|
|
||||||
|
$validator->checkCode($post['ticket'], $post['rand']);
|
||||||
|
}
|
||||||
|
|
||||||
$service = new SmsVerifyService();
|
$service = new SmsVerifyService();
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user