summaryrefslogtreecommitdiffstats
path: root/lib/private/Encryption
diff options
context:
space:
mode:
authorMorris Jobke <hey@morrisjobke.de>2017-03-03 01:24:27 -0600
committerMorris Jobke <hey@morrisjobke.de>2017-03-09 17:35:09 -0600
commita5ba1f78033b3ebe69c771fb33c1217a60494728 (patch)
treeb4bdf0ec562db9e91071eeef39f82586ce48eef4 /lib/private/Encryption
parent6fd0e7e93995facfe75b26699ea462bb94fd03b9 (diff)
downloadnextcloud-server-a5ba1f78033b3ebe69c771fb33c1217a60494728.tar.gz
nextcloud-server-a5ba1f78033b3ebe69c771fb33c1217a60494728.zip
Remove legacy class OC_Group and OC_User
* basically a straight replacement of the wrapped code at the calling code parts Signed-off-by: Morris Jobke <hey@morrisjobke.de>
Diffstat (limited to 'lib/private/Encryption')
-rw-r--r--lib/private/Encryption/Util.php12
1 files changed, 11 insertions, 1 deletions
diff --git a/lib/private/Encryption/Util.php b/lib/private/Encryption/Util.php
index 3afa1bb9596..76e1200a1cb 100644
--- a/lib/private/Encryption/Util.php
+++ b/lib/private/Encryption/Util.php
@@ -273,8 +273,18 @@ class Util {
$result = \OCP\User::getUsers();
} else {
$result = array_merge($result, $users);
+
+ $groupManager = \OC::$server->getGroupManager();
foreach ($groups as $group) {
- $result = array_merge($result, \OC_Group::usersInGroup($group));
+ $groupObject = $groupManager->get($group);
+ if ($groupObject) {
+ $foundUsers = $groupObject->searchUsers('', -1, 0);
+ $userIds = [];
+ foreach ($foundUsers as $user) {
+ $userIds[] = $user->getUID();
+ }
+ $result = array_merge($result, $userIds);
+ }
}
}