]> _ Git - cubist_util.git/commitdiff
wip #7406 @1
authorVincent Vanwaelscappel <vincent@cubedesigners.com>
Thu, 20 Mar 2025 09:58:51 +0000 (10:58 +0100)
committerVincent Vanwaelscappel <vincent@cubedesigners.com>
Thu, 20 Mar 2025 09:58:51 +0000 (10:58 +0100)
src/CommandLine/Owncloud.php [new file with mode: 0644]

diff --git a/src/CommandLine/Owncloud.php b/src/CommandLine/Owncloud.php
new file mode 100644 (file)
index 0000000..40d61e7
--- /dev/null
@@ -0,0 +1,24 @@
+<?php
+
+namespace Cubist\Util\CommandLine;
+
+use Cubist\Util\CommandLine;
+
+class Owncloud extends CommandLine
+{
+    public function __construct($program = 'occ', $output = null, $error = true, $outputPrefix = null)
+    {
+        parent::__construct($program, $output, $error, $outputPrefix);
+    }
+
+    public function listUsers()
+    {
+        // docker exec nextcloud /var/www/html/occ user:list -i
+        $this->setArg(null, 'user:list');
+        $this->setArg('i');
+        $this->setArg('output', 'json');
+        $this->execute();
+
+        return json_decode($this->output);
+    }
+}
\ No newline at end of file