Skip to content

Commit 8c3a1d2

Browse files
authored
Merge pull request #314 from nextcloud/fix/user-always-empty
Fix filter by user listing
2 parents f2b96bd + 321461e commit 8c3a1d2

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

lib/Command/ListShares.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,7 @@ protected function execute(InputInterface $input, OutputInterface $output): int
117117
}
118118
});
119119
} else {
120-
$shares = iter\toArray($this->sharesList->getFormattedShares($user = "", $filter, $path, $token));
120+
$shares = iter\toArray($this->sharesList->getFormattedShares($user, $filter, $path, $token));
121121
}
122122

123123
$output->writeln(json_encode($shares, JSON_PRETTY_PRINT | JSON_UNESCAPED_UNICODE));

lib/Service/SharesList.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -190,7 +190,7 @@ public function getSub(string $userId, int $filter, string $path): \Iterator {
190190
return $shares;
191191
}
192192

193-
public function getFormattedShares(string $userId, int $filter, string $path = null, string $token = null): \Iterator {
193+
public function getFormattedShares(string $userId = '', int $filter, string $path = null, string $token = null): \Iterator {
194194
$shares = $this->get($userId, $filter, $path, $token);
195195

196196
$formattedShares = iter\map(function (IShare $share) {

0 commit comments

Comments
 (0)