Browse Source

Merge pull request #5090 from pixelfed/staging

Update AdminCuratedRegisterController, fix existing account approval
daniel 1 year ago
parent
commit
6b88ed23b6
2 changed files with 6 additions and 0 deletions
  1. 1 0
      CHANGELOG.md
  2. 5 0
      app/Http/Controllers/AdminCuratedRegisterController.php

+ 1 - 0
CHANGELOG.md

@@ -7,6 +7,7 @@
 - Update AdminCuratedRegisterController, increase message length from 1000 to 3000 ([9a5e3471](https://github.com/pixelfed/pixelfed/commit/9a5e3471))
 - Update AdminCuratedRegisterController, increase message length from 1000 to 3000 ([9a5e3471](https://github.com/pixelfed/pixelfed/commit/9a5e3471))
 - Update ApiV1Controller, add pe (pixelfed entity) support to /api/v1/statuses/{id}/context endpoint ([d645d6ca](https://github.com/pixelfed/pixelfed/commit/d645d6ca))
 - Update ApiV1Controller, add pe (pixelfed entity) support to /api/v1/statuses/{id}/context endpoint ([d645d6ca](https://github.com/pixelfed/pixelfed/commit/d645d6ca))
 - Update Admin Curated Onboarding, add select-all/mass action operations ([b22cac94](https://github.com/pixelfed/pixelfed/commit/b22cac94))
 - Update Admin Curated Onboarding, add select-all/mass action operations ([b22cac94](https://github.com/pixelfed/pixelfed/commit/b22cac94))
+- Update AdminCuratedRegisterController, fix existing account approval ([cbb96cfd](https://github.com/pixelfed/pixelfed/commit/cbb96cfd))
 -  ([](https://github.com/pixelfed/pixelfed/commit/))
 -  ([](https://github.com/pixelfed/pixelfed/commit/))
 
 
 ## [v0.12.1 (2024-05-07)](https://github.com/pixelfed/pixelfed/compare/v0.12.0...v0.12.1)
 ## [v0.12.1 (2024-05-07)](https://github.com/pixelfed/pixelfed/compare/v0.12.0...v0.12.1)

+ 5 - 0
app/Http/Controllers/AdminCuratedRegisterController.php

@@ -240,6 +240,11 @@ class AdminCuratedRegisterController extends Controller
         $record->is_closed = true;
         $record->is_closed = true;
         $record->action_taken_at = now();
         $record->action_taken_at = now();
         $record->save();
         $record->save();
+
+        if (User::withTrashed()->whereEmail($record->email)->exists()) {
+            return [200];
+        }
+
         $user = User::create([
         $user = User::create([
             'name' => $record->username,
             'name' => $record->username,
             'username' => $record->username,
             'username' => $record->username,