From 2db8257265e093ff21b4d44c16bd0318a63d4cb6 Mon Sep 17 00:00:00 2001 From: Vincent Vanwaelscappel Date: Thu, 20 Mar 2025 11:43:02 +0100 Subject: [PATCH] wip #7406 @0.25 --- src/CommandLine/Owncloud.php | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) diff --git a/src/CommandLine/Owncloud.php b/src/CommandLine/Owncloud.php index 01b4c37..4cfe19d 100644 --- a/src/CommandLine/Owncloud.php +++ b/src/CommandLine/Owncloud.php @@ -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] [--] + $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 -- 2.39.5