Merge pull request #9144 from nextcloud/allow-lang-ocs-api

Add language support for user creation in api
This commit is contained in:
Morris Jobke 2018-04-11 16:21:32 +02:00 committed by GitHub
commit e6c146121e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 6 additions and 1 deletions

View File

@ -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);