Pārlūkot izejas kodu

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

Daniel Supernault 3 gadi atpakaļ
vecāks
revīzija
3f322e29d7

+ 4 - 1
app/Http/Controllers/Admin/AdminReportController.php

@@ -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;
 				})