1
0
Fork 0
forked from mirror/pixelfed

Fix email verification requests filtering to gracefully handle deleted accounts and accounts already verified

This commit is contained in:
Daniel Supernault 2022-08-04 03:41:54 -06:00
parent 872f5f879b
commit b57066d15d
No known key found for this signature in database
GPG key ID: 0DEF1C662C9033F7

View file

@ -560,10 +560,10 @@ trait AdminReportController
}) })
->map(function($id) { ->map(function($id) {
$user = User::whereProfileId($id)->first(); $user = User::whereProfileId($id)->first();
if(!$user) { if(!$user || $user->email_verified_at) {
return []; return [];
} }
$account = AccountService::get($id); $account = AccountService::get($id, true);
if(!$account) { if(!$account) {
return []; return [];
} }