From 89da1af889f73b67bb3aedb5ffb2ee6cbd2be062 Mon Sep 17 00:00:00 2001 From: "John Molakvoæ (skjnldsv)" Date: Tue, 10 Apr 2018 12:08:10 +0200 Subject: Add language support for user creation MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: John Molakvoæ (skjnldsv) --- apps/provisioning_api/lib/Controller/UsersController.php | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/apps/provisioning_api/lib/Controller/UsersController.php b/apps/provisioning_api/lib/Controller/UsersController.php index 420c09dfecb..7bbbe554838 100644 --- a/apps/provisioning_api/lib/Controller/UsersController.php +++ b/apps/provisioning_api/lib/Controller/UsersController.php @@ -206,7 +206,8 @@ class UsersController extends AUserData { string $email = '', array $groups = [], array $subadmin = [], - string $quota = ''): DataResponse { + string $quota = '', + string $language = 'en'): DataResponse { $user = $this->userSession->getUser(); $isAdmin = $this->groupManager->isAdmin($user->getUID()); $subAdminManager = $this->groupManager->getSubAdmin(); @@ -279,6 +280,10 @@ class UsersController extends AUserData { $this->editUser($userid, 'quota', $quota); } + if ($language !== '') { + $this->editUser($userid, 'language', $language); + } + // Send new user mail only if a mail is set if ($email !== '') { $newUser->setEMailAddress($email); -- cgit v1.2.3