From 8c1432baeed7600f4ca5df4097bd8f31332acbca Mon Sep 17 00:00:00 2001 From: Baptiste Fotia Date: Thu, 21 Mar 2024 18:04:58 +0100 Subject: [PATCH] feat(command): Print a success message Inform the end-user when he/she add or remove user from a group with the occ command. Signed-off-by: Baptiste Fotia --- core/Command/Group/AddUser.php | 3 +++ core/Command/Group/RemoveUser.php | 3 +++ 2 files changed, 6 insertions(+) diff --git a/core/Command/Group/AddUser.php b/core/Command/Group/AddUser.php index a66d2898ef9aa..fb9e22affeea9 100644 --- a/core/Command/Group/AddUser.php +++ b/core/Command/Group/AddUser.php @@ -67,7 +67,10 @@ protected function execute(InputInterface $input, OutputInterface $output): int $output->writeln('user not found'); return 1; } + $group->addUser($user); + $output->writeln('success'); + return 0; } diff --git a/core/Command/Group/RemoveUser.php b/core/Command/Group/RemoveUser.php index 6c7d4ce4d84d8..56deab593d072 100644 --- a/core/Command/Group/RemoveUser.php +++ b/core/Command/Group/RemoveUser.php @@ -68,6 +68,9 @@ protected function execute(InputInterface $input, OutputInterface $output): int return 1; } $group->removeUser($user); + + $output->writeln('success'); + return 0; }