summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJohn Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>2018-04-10 12:08:10 +0200
committerJohn Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>2018-04-11 10:59:56 +0200
commit89da1af889f73b67bb3aedb5ffb2ee6cbd2be062 (patch)
treed7684f09157853e6403817c50e919a699daca6d4
parent323ee3cbdc420f1009b6eb64b2df0f878ff39a14 (diff)
downloadnextcloud-server-89da1af889f73b67bb3aedb5ffb2ee6cbd2be062.tar.gz
nextcloud-server-89da1af889f73b67bb3aedb5ffb2ee6cbd2be062.zip
Add language support for user creation
Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
-rw-r--r--apps/provisioning_api/lib/Controller/UsersController.php7
1 files changed, 6 insertions, 1 deletions
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);