Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion apps/provisioning_api/lib/Controller/UsersController.php
Original file line number Diff line number Diff line change
Expand Up @@ -337,7 +337,7 @@ public function addUser(string $userid,
}
}

return new DataResponse(['UserID' => $userid]);
return new DataResponse(['id' => $userid]);

} catch (HintException $e ) {
$this->logger->logException($e, [
Expand Down
12 changes: 6 additions & 6 deletions apps/provisioning_api/tests/Controller/UsersControllerTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -357,7 +357,7 @@ public function testAddUserSuccessful() {
->willReturn(true);

$this->assertTrue(key_exists(
'UserID',
'id',
$this->api->addUser('NewUser', 'PasswordOfTheNewUser')->getData()
));
}
Expand Down Expand Up @@ -417,7 +417,7 @@ public function testAddUserSuccessfulWithDisplayName() {
->with('NewUser', 'display', 'DisplayNameOfTheNewUser');

$this->assertTrue(key_exists(
'UserID',
'id',
$api->addUser('NewUser', 'PasswordOfTheNewUser', 'DisplayNameOfTheNewUser')->getData()
));
}
Expand Down Expand Up @@ -467,7 +467,7 @@ public function testAddUserSuccessfulGenerateUserID() {
->willReturnCallback(function() { return (string)rand(1000000000, 9999999999); });

$this->assertTrue(key_exists(
'UserID',
'id',
$this->api->addUser('', 'PasswordOfTheNewUser')->getData()
));
}
Expand Down Expand Up @@ -556,7 +556,7 @@ public function testAddUserEmailRequired() {
->willReturn(true);

$this->assertTrue(key_exists(
'UserID',
'id',
$this->api->addUser('NewUser', 'PasswordOfTheNewUser')->getData()
));
}
Expand Down Expand Up @@ -617,7 +617,7 @@ public function testAddUserExistingGroup() {
);

$this->assertTrue(key_exists(
'UserID',
'id',
$this->api->addUser('NewUser', 'PasswordOfTheNewUser', '', '', ['ExistingGroup'])->getData()
));
}
Expand Down Expand Up @@ -838,7 +838,7 @@ public function testAddUserAsSubAdminExistingGroups() {
->willReturn(true);

$this->assertTrue(key_exists(
'UserID',
'id',
$this->api->addUser('NewUser', 'PasswordOfTheNewUser', '', '', ['ExistingGroup1', 'ExistingGroup2'])->getData()
));
}
Expand Down
8 changes: 4 additions & 4 deletions settings/js/vue-settings-apps-users-management.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion settings/js/vue-settings-apps-users-management.js.map

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion settings/src/store/users.js
Original file line number Diff line number Diff line change
Expand Up @@ -429,7 +429,7 @@ const actions = {
addUser({commit, dispatch}, { userid, password, displayName, email, groups, subadmin, quota, language }) {
return api.requireAdmin().then((response) => {
return api.post(OC.linkToOCS(`cloud/users`, 2), { userid, password, displayName, email, groups, subadmin, quota, language })
.then((response) => dispatch('addUserData', userid || response.data.ocs.data.UserID))
.then((response) => dispatch('addUserData', userid || response.data.ocs.data.id))
.catch((error) => {throw error;});
}).catch((error) => {
commit('API_FAILURE', { userid, error });
Expand Down