mirror of
https://github.com/nextcloud/server.git
synced 2026-03-04 18:28:08 +01:00
Add language support for user creation
Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user