Browse Source

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

Daniel Supernault 2 năm trước cách đây
mục cha
commit
b57066d15d
1 tập tin đã thay đổi với 2 bổ sung2 xóa
  1. 2 2
      app/Http/Controllers/Admin/AdminReportController.php

+ 2 - 2
app/Http/Controllers/Admin/AdminReportController.php

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