From 36326e38a08a4269416b6defe460e2a65609ad9a Mon Sep 17 00:00:00 2001 From: Daniel Calviño Sánchez Date: Thu, 19 Apr 2018 00:12:06 +0200 Subject: Add optional "displayName" parameter to add user endpoint MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Daniel Calviño Sánchez --- apps/provisioning_api/lib/Controller/UsersController.php | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'apps/provisioning_api/lib') diff --git a/apps/provisioning_api/lib/Controller/UsersController.php b/apps/provisioning_api/lib/Controller/UsersController.php index 52021ec2486..d5e568b9184 100644 --- a/apps/provisioning_api/lib/Controller/UsersController.php +++ b/apps/provisioning_api/lib/Controller/UsersController.php @@ -199,6 +199,7 @@ class UsersController extends AUserData { * * @param string $userid * @param string $password + * @param string $displayName * @param string $email * @param array $groups * @param array $subadmins @@ -209,6 +210,7 @@ class UsersController extends AUserData { */ public function addUser(string $userid, string $password = '', + string $displayName = '', string $email = '', array $groups = [], array $subadmin = [], @@ -282,6 +284,10 @@ class UsersController extends AUserData { $subAdminManager->createSubAdmin($newUser, $group); } + if ($displayName !== '') { + $this->editUser($userid, 'display', $displayName); + } + if ($quota !== '') { $this->editUser($userid, 'quota', $quota); } -- cgit v1.2.3