Update adminReportController, fix mail verification request 500 bug by changing filter precedence to catch deleted users that may still be cached in AccountService

pull/3474/head
Daniel Supernault 2022-05-16 02:16:23 -06:00
rodzic 0a7a061a83
commit 3f322e29d7
Nie znaleziono w bazie danych klucza dla tego podpisu
ID klucza GPG: 0DEF1C662C9033F7
1 zmienionych plików z 4 dodań i 1 usunięć

Wyświetl plik

@ -528,11 +528,14 @@ trait AdminReportController
return !in_array($id, $ignored);
})
->map(function($id) {
$account = AccountService::get($id);
$user = User::whereProfileId($id)->first();
if(!$user) {
return [];
}
$account = AccountService::get($id);
if(!$account) {
return [];
}
$account['email'] = $user->email;
return $account;
})