Merge pull request #9162 from nextcloud/allow-lang-ocs-api
Add language support for user creation
This commit is contained in:
commit
63dfbb2127
1 changed files with 7 additions and 1 deletions
|
@ -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);
|
||||
|
|
Loading…
Reference in a new issue