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);
|
||||
|
||||
$captcha = $this->getSettings('captcha');
|
||||
|
||||
/**
|
||||
* 验证码是一次性的,放到最后检查,减少第三方调用
|
||||
*/
|
||||
if ($captcha['enabled'] == 1) {
|
||||
|
||||
$validator = new CaptchaValidator();
|
||||
|
||||
$validator->checkCode($post['ticket'], $post['rand']);
|
||||
}
|
||||
|
||||
$this->auth->saveAuthInfo($user);
|
||||
|
||||
|
@ -23,9 +23,14 @@ class MailCode extends LogicService
|
||||
|
||||
$post['email'] = $validator->checkEmail($post['email']);
|
||||
|
||||
$captcha = $this->getSettings('captcha');
|
||||
|
||||
if ($captcha['enabled'] == 1) {
|
||||
|
||||
$validator = new CaptchaValidator();
|
||||
|
||||
$validator->checkCode($post['ticket'], $post['rand']);
|
||||
}
|
||||
|
||||
$service = new MailVerifyService();
|
||||
|
||||
|
@ -23,9 +23,14 @@ class SmsCode extends LogicService
|
||||
|
||||
$post['phone'] = $validator->checkPhone($post['phone']);
|
||||
|
||||
$captcha = $this->getSettings('captcha');
|
||||
|
||||
if ($captcha['enabled'] == 1) {
|
||||
|
||||
$validator = new CaptchaValidator();
|
||||
|
||||
$validator->checkCode($post['ticket'], $post['rand']);
|
||||
}
|
||||
|
||||
$service = new SmsVerifyService();
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user