summaryrefslogtreecommitdiffstats
path: root/apps
diff options
context:
space:
mode:
authorRoeland Jago Douma <rullzer@users.noreply.github.com>2018-04-17 11:01:46 +0200
committerGitHub <noreply@github.com>2018-04-17 11:01:46 +0200
commit63dfbb2127ec9a930778dd5d31b640c5f2cc3652 (patch)
tree8b5ca4a50e04eddc8da86992e38d534642eac446 /apps
parentdfffc0fddaeb952421cf588e74055f26bc8c50a8 (diff)
parent5bd02a63a86ba053c14ce544fa37ac0b56909a69 (diff)
downloadnextcloud-server-63dfbb2127ec9a930778dd5d31b640c5f2cc3652.tar.gz
nextcloud-server-63dfbb2127ec9a930778dd5d31b640c5f2cc3652.zip
Merge pull request #9162 from nextcloud/allow-lang-ocs-api
Add language support for user creation
Diffstat (limited to 'apps')
-rw-r--r--apps/provisioning_api/lib/Controller/UsersController.php8
1 files changed, 7 insertions, 1 deletions
diff --git a/apps/provisioning_api/lib/Controller/UsersController.php b/apps/provisioning_api/lib/Controller/UsersController.php
index 420c09dfecb..30812a3ca05 100644
--- a/apps/provisioning_api/lib/Controller/UsersController.php
+++ b/apps/provisioning_api/lib/Controller/UsersController.php
@@ -198,6 +198,7 @@ class UsersController extends AUserData {
* @param array $groups
* @param array $subadmins
* @param string $quota
+ * @param string $language
* @return DataResponse
* @throws OCSException
*/
@@ -206,7 +207,8 @@ class UsersController extends AUserData {
string $email = '',
array $groups = [],
array $subadmin = [],
- string $quota = ''): DataResponse {
+ string $quota = '',
+ string $language = ''): DataResponse {
$user = $this->userSession->getUser();
$isAdmin = $this->groupManager->isAdmin($user->getUID());
$subAdminManager = $this->groupManager->getSubAdmin();
@@ -279,6 +281,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);