Merge pull request #5090 from pixelfed/staging

Update AdminCuratedRegisterController, fix existing account approval
This commit is contained in:
daniel 2024-05-16 05:48:59 -06:00 committed by GitHub
commit 6b88ed23b6
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 6 additions and 0 deletions

View file

@ -7,6 +7,7 @@
- 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 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/))
## [v0.12.1 (2024-05-07)](https://github.com/pixelfed/pixelfed/compare/v0.12.0...v0.12.1)

View file

@ -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,