From 85df11404b06f0a94023652bcf6a5d7498d9648e Mon Sep 17 00:00:00 2001 From: Vitor Mattos Date: Fri, 17 Jan 2025 19:17:15 -0300 Subject: [PATCH] fix: prevent error when user not found The account of identify method could be deleted and throw error, this isn't good. With this property is possible to prevent the error Signed-off-by: Vitor Mattos --- lib/Service/FileService.php | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/lib/Service/FileService.php b/lib/Service/FileService.php index 65cde493a..34d7124c0 100644 --- a/lib/Service/FileService.php +++ b/lib/Service/FileService.php @@ -779,10 +779,12 @@ private function associateAllAndFormat(IUser $user, array $files, array $signers if ($data['me']) { $temp = array_map(function (IdentifyMethod $identifyMethodEntity) use ($signer): array { $this->identifyMethodService->setCurrentIdentifyMethod($identifyMethodEntity); - $identifyMethod = $this->identifyMethodService->getInstanceOfIdentifyMethod( - $identifyMethodEntity->getIdentifierKey(), - $identifyMethodEntity->getIdentifierValue(), - ); + $identifyMethod = $this->identifyMethodService + ->setIsRequest(false) + ->getInstanceOfIdentifyMethod( + $identifyMethodEntity->getIdentifierKey(), + $identifyMethodEntity->getIdentifierValue(), + ); $signatureMethods = $identifyMethod->getSignatureMethods(); $return = []; foreach ($signatureMethods as $signatureMethod) {