aboutsummaryrefslogtreecommitdiffstats
path: root/core/Command/User/LastSeen.php
diff options
context:
space:
mode:
Diffstat (limited to 'core/Command/User/LastSeen.php')
-rw-r--r--core/Command/User/LastSeen.php18
1 files changed, 16 insertions, 2 deletions
diff --git a/core/Command/User/LastSeen.php b/core/Command/User/LastSeen.php
index e56ddd5087f..dc01ca549f3 100644
--- a/core/Command/User/LastSeen.php
+++ b/core/Command/User/LastSeen.php
@@ -25,13 +25,15 @@
*/
namespace OC\Core\Command\User;
+use OC\Core\Command\Base;
+use OCP\IUser;
use OCP\IUserManager;
-use Symfony\Component\Console\Command\Command;
+use Stecman\Component\Symfony\Console\BashCompletion\CompletionContext;
use Symfony\Component\Console\Input\InputArgument;
use Symfony\Component\Console\Input\InputInterface;
use Symfony\Component\Console\Output\OutputInterface;
-class LastSeen extends Command {
+class LastSeen extends Base {
/** @var IUserManager */
protected $userManager;
@@ -73,4 +75,16 @@ class LastSeen extends Command {
}
return 0;
}
+
+ /**
+ * @param string $argumentName
+ * @param CompletionContext $context
+ * @return string[]
+ */
+ public function completeArgumentValues($argumentName, CompletionContext $context) {
+ if ($argumentName === 'uid') {
+ return array_map(static fn (IUser $user) => $user->getUID(), $this->userManager->search($context->getCurrentWord()));
+ }
+ return [];
+ }
}