diff --git a/application/Espo/Tools/EmailFolder/Service.php b/application/Espo/Tools/EmailFolder/Service.php index a1d6dfb53a..9674045845 100644 --- a/application/Espo/Tools/EmailFolder/Service.php +++ b/application/Espo/Tools/EmailFolder/Service.php @@ -87,7 +87,7 @@ class Service /** @var ?User $user */ $user = $userId === $this->user->getId() ? - $this->user->getId() : + $this->user : $this->entityManager->getEntityById(User::ENTITY_TYPE, $userId); if (!$user) {