diff --git a/app/Http/Controllers/AuthController.php b/app/Http/Controllers/AuthController.php index 1e81eae..9b49212 100644 --- a/app/Http/Controllers/AuthController.php +++ b/app/Http/Controllers/AuthController.php @@ -225,9 +225,15 @@ class AuthController extends Controller 'type' => 'required|string' ]); - $this->sendVerification($request->email, $request->type); + $user_db = User::where('email', $request->email)->first(); + $user_cache = Cache::get($request->email); - return response()->json(['message' => 'Link resend successfully'], 200); + if ($user_db || $user_cache) { + $this->sendVerification($request->email, $request->type); + return response()->json(['message' => 'Link resend successfully'], 200); + } + + abort(403); } public function createFingerPrint()