summaryrefslogtreecommitdiffstats
path: root/apps/provisioning_api/lib
diff options
context:
space:
mode:
authorDaniel Calviño Sánchez <danxuliu@gmail.com>2018-04-19 00:12:06 +0200
committerDaniel Calviño Sánchez <danxuliu@gmail.com>2018-07-31 13:33:55 +0200
commit36326e38a08a4269416b6defe460e2a65609ad9a (patch)
treea02d67c5a218b988b9220033b0c382bf0401061c /apps/provisioning_api/lib
parentc39bc1638b812ef9660cfdb0ab6ca58d70ad68d8 (diff)
downloadnextcloud-server-36326e38a08a4269416b6defe460e2a65609ad9a.tar.gz
nextcloud-server-36326e38a08a4269416b6defe460e2a65609ad9a.zip
Add optional "displayName" parameter to add user endpoint
Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
Diffstat (limited to 'apps/provisioning_api/lib')
-rw-r--r--apps/provisioning_api/lib/Controller/UsersController.php6
1 files changed, 6 insertions, 0 deletions
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);
}