Pārlūkot izejas kodu

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

Daniel Supernault 2 gadi atpakaļ
vecāks
revīzija
b57066d15d

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

@@ -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 [];
 					}
 					}