Browse Source

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 năm trước cách đây
mục cha
commit
3f322e29d7
1 tập tin đã thay đổi với 4 bổ sung1 xóa
  1. 4 1
      app/Http/Controllers/Admin/AdminReportController.php

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