Skip to content

Commit cbb96cf

Browse files
committed
Update AdminCuratedRegisterController, fix existing account approval
1 parent 1ff71b2 commit cbb96cf

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

app/Http/Controllers/AdminCuratedRegisterController.php

+5
Original file line numberDiff line numberDiff line change
@@ -240,6 +240,11 @@ public function apiHandleApprove(Request $request, $id)
240240
$record->is_closed = true;
241241
$record->action_taken_at = now();
242242
$record->save();
243+
244+
if (User::withTrashed()->whereEmail($record->email)->exists()) {
245+
return [200];
246+
}
247+
243248
$user = User::create([
244249
'name' => $record->username,
245250
'username' => $record->username,

0 commit comments

Comments
 (0)