Merge pull request #9883 from nextcloud/return-user-groups-ids

Return groups IDs and not Names
pull/9884/head
Morris Jobke 2018-06-15 17:16:45 +07:00 committed by GitHub
commit 2ec4fb4327
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 4 deletions

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

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