diff options
author | Morris Jobke <hey@morrisjobke.de> | 2018-06-15 17:16:45 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-06-15 17:16:45 +0200 |
commit | 2ec4fb43278a9183df5565534aa6b1bc956f5e2d (patch) | |
tree | 5fab89bb70f5ef55000886b8e008173a337cd8db /apps | |
parent | 8f6acbff621b02cead64219eb9e6b03f4951075a (diff) | |
parent | f0ce44fedf00951dccdbef11e6e161cdefef9598 (diff) | |
download | nextcloud-server-2ec4fb43278a9183df5565534aa6b1bc956f5e2d.tar.gz nextcloud-server-2ec4fb43278a9183df5565534aa6b1bc956f5e2d.zip |
Merge pull request #9883 from nextcloud/return-user-groups-ids
Return groups IDs and not Names
Diffstat (limited to 'apps')
-rw-r--r-- | apps/provisioning_api/lib/Controller/AUserData.php | 2 | ||||
-rw-r--r-- | apps/provisioning_api/tests/Controller/UsersControllerTest.php | 6 |
2 files changed, 4 insertions, 4 deletions
diff --git a/apps/provisioning_api/lib/Controller/AUserData.php b/apps/provisioning_api/lib/Controller/AUserData.php index 348eea7c19b..2e29cc1df12 100644 --- a/apps/provisioning_api/lib/Controller/AUserData.php +++ b/apps/provisioning_api/lib/Controller/AUserData.php @@ -105,7 +105,7 @@ abstract class AUserData extends OCSController { $groups = $this->groupManager->getUserGroups($targetUserObject); $gids = []; foreach ($groups as $group) { - $gids[] = $group->getDisplayName(); + $gids[] = $group->getGID(); } // Find the data diff --git a/apps/provisioning_api/tests/Controller/UsersControllerTest.php b/apps/provisioning_api/tests/Controller/UsersControllerTest.php index ce127c1b365..114742de4f9 100644 --- a/apps/provisioning_api/tests/Controller/UsersControllerTest.php +++ b/apps/provisioning_api/tests/Controller/UsersControllerTest.php @@ -707,13 +707,13 @@ class UsersControllerTest extends TestCase { ->method('getSubAdminsGroups') ->willReturn([$group]); $group->expects($this->at(0)) - ->method('getDisplayName') + ->method('getGID') ->willReturn('group0'); $group->expects($this->at(1)) - ->method('getDisplayName') + ->method('getGID') ->willReturn('group1'); $group->expects($this->at(2)) - ->method('getDisplayName') + ->method('getGID') ->willReturn('group2'); $group->expects($this->at(3)) ->method('getGID') |