perf: 优化用户邮箱验证

This commit is contained in:
kuaifan
2022-04-07 08:37:45 +08:00
parent 601d037201
commit 01313b16e1
6 changed files with 35 additions and 59 deletions

View File

@@ -10,7 +10,6 @@ use Cache;
use Captcha;
use Carbon\Carbon;
use Request;
use Validator;
/**
* @apiDefine users
@@ -92,7 +91,7 @@ class UsersController extends AbstractController
Cache::forget("code::" . $email);
if ($isRegVerify && $user->email_verity === 0) {
UserEmailVerification::userEmailSend($user);
return $retError('您还没有验证邮箱,请先登录邮箱通过验证邮件验证邮箱');
return Base::retError('您还没有验证邮箱,请先登录邮箱通过验证邮件验证邮箱', ['code' => 'email']);
}
}
//