Skip to content

Commit

Permalink
Filter unavailable users
Browse files Browse the repository at this point in the history
  • Loading branch information
VicDeo committed Apr 12, 2019
1 parent 5b2c425 commit 5322ad7
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions apps/federatedfilesharing/lib/Command/PollIncomingShares.php
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,13 @@ public function execute(InputInterface $input, OutputInterface $output) {
$cursor = $this->getCursor();
while ($data = $cursor->fetch()) {
$user = $this->userManager->get($data['user']);
if ($user === null) {
$output->writeln(
"Skipping user \"{$data['user']}\". Reason: user manager was unable to resolve the uid into the user object"
);
continue;
}

$userMounts = $this->externalMountProvider->getMountsForUser($user, $this->loader);
/** @var \OCA\Files_Sharing\External\Mount $mount */
foreach ($userMounts as $mount) {
Expand Down

0 comments on commit 5322ad7

Please sign in to comment.