mirror of
https://github.com/nextcloud/server.git
synced 2026-06-13 18:50:47 -04:00
Merge pull request #9883 from nextcloud/return-user-groups-ids
Return groups IDs and not Names
This commit is contained in:
commit
2ec4fb4327
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')
|
||||
|
|
|
|||
Loading…
Reference in a new issue