diff --git a/lib/private/util.php b/lib/private/util.php index 8e3a0302513937036d17f346b984899ab3f1ed9e..e48cdd4d9fc6b1f2f5188b4b775a38267e40158e 100644 --- a/lib/private/util.php +++ b/lib/private/util.php @@ -237,7 +237,7 @@ class OC_Util { $newValue = json_encode($excludedGroups); $config->setAppValue('core', 'shareapi_exclude_groups_list', $newValue); } - $usersGroups = $groupManager->getUserGroups($user); + $usersGroups = $groupManager->getUserGroupIds($user); if (!empty($usersGroups)) { $remainingGroups = array_diff($usersGroups, $excludedGroups); // if the user is only in groups which are disabled for sharing then diff --git a/tests/lib/util.php b/tests/lib/util.php index cb575976f3fceffc4eed1bd04ed65b25dcf1a346..a328b1923e961566430ac9d79740d4e30ec0feb9 100644 --- a/tests/lib/util.php +++ b/tests/lib/util.php @@ -306,24 +306,10 @@ class Test_Util extends \Test\TestCase { $groupManager ->expects($this->at(0)) - ->method('getUserGroups') + ->method('getUserGroupIds') ->with($user) ->will($this->returnValue($membership)); -// $uid = "user1"; -// \OC_User::setUserId($uid); -// -// \OC_User::createUser($uid, "passwd"); -// -// foreach ($groups as $group) { -// \OC_Group::createGroup($group); -// } -// -// foreach ($membership as $group) { -// \OC_Group::addToGroup($uid, $group); -// } -// - $result = \OC_Util::isSharingDisabledForUser($config, $groupManager, $user); $this->assertSame($expected, $result);