Browse Source

update: send email verify

v2board 2 years ago
parent
commit
6f8e395681
1 changed files with 5 additions and 0 deletions
  1. 5 0
      app/Http/Controllers/V1/Passport/CommController.php

+ 5 - 0
app/Http/Controllers/V1/Passport/CommController.php

@@ -36,6 +36,11 @@ class CommController extends Controller
         if (Cache::get(CacheKey::get('LAST_SEND_EMAIL_VERIFY_TIMESTAMP', $email))) {
             abort(500, __('Email verification code has been sent, please request again later'));
         }
+        if (!User::where('email', $email)->first()) {
+            return [
+                'data' => true
+            ];
+        }
         $code = rand(100000, 999999);
         $subject = config('v2board.app_name', 'V2Board') . __('Email verification code');