From cbb96cfd2a9041f486697b80db794060a1101c71 Mon Sep 17 00:00:00 2001 From: Daniel Supernault Date: Thu, 16 May 2024 05:45:31 -0600 Subject: [PATCH] Update AdminCuratedRegisterController, fix existing account approval --- app/Http/Controllers/AdminCuratedRegisterController.php | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/app/Http/Controllers/AdminCuratedRegisterController.php b/app/Http/Controllers/AdminCuratedRegisterController.php index 4e1d0eec..afdcfba1 100644 --- a/app/Http/Controllers/AdminCuratedRegisterController.php +++ b/app/Http/Controllers/AdminCuratedRegisterController.php @@ -240,6 +240,11 @@ class AdminCuratedRegisterController extends Controller $record->is_closed = true; $record->action_taken_at = now(); $record->save(); + + if (User::withTrashed()->whereEmail($record->email)->exists()) { + return [200]; + } + $user = User::create([ 'name' => $record->username, 'username' => $record->username,