]> _ Git - cubist_util.git/commitdiff
wip #7406 @0.25
authorVincent Vanwaelscappel <vincent@cubedesigners.com>
Thu, 20 Mar 2025 10:43:02 +0000 (11:43 +0100)
committerVincent Vanwaelscappel <vincent@cubedesigners.com>
Thu, 20 Mar 2025 10:43:02 +0000 (11:43 +0100)
src/CommandLine/Owncloud.php

index 01b4c3709f357485b3b564ff4d48c588745af212..4cfe19de3494a5e331ef8d638a5cd217b35c7b28 100644 (file)
@@ -25,6 +25,7 @@ class Owncloud extends CommandLine
     public function addUser($email, $userID = null, $name = '', $password = null)
     {
         // user:add [--password-from-env] [--generate-password] [--display-name [DISPLAY-NAME]] [-g|--group [GROUP]] [--email EMAIL] [--] <uid>
+
         $this->setArg(null, 'user:add');
         if (null === $password) {
             $this->setArg('generate-password');
@@ -38,6 +39,22 @@ class Owncloud extends CommandLine
         $this->setArg('email', $email);
         $this->setArg(null, $userID ?? $email);
         $this->execute();
-        $this->dd();
+        $this->debug();
+    }
+
+    public function disableUser($userID)
+    {
+        $this->setArg(null, 'user:disable');
+        $this->setArg(null, $userID);
+        $this->execute();
+        $this->debug();
+    }
+
+    public function enableUser($userID)
+    {
+        $this->setArg(null, 'user:enable');
+        $this->setArg(null, $userID);
+        $this->execute();
+        $this->debug();
     }
 }
\ No newline at end of file