Revert "Merge pull request #8998 from macjohnny/master"

This reverts commit 482eded8b3, reversing
changes made to 354cace14a.
This commit is contained in:
Morris Jobke 2014-06-12 14:56:46 +02:00
parent 8e463926a0
commit ab7cff6dfd
2 changed files with 6 additions and 13 deletions

View File

@ -187,7 +187,12 @@ class OC_Group {
public static function getUserGroups($uid) {
$user = self::$userManager->get($uid);
if ($user) {
return self::getManager()->getUserGroupIds($user);
$groups = self::getManager()->getUserGroups($user);
$groupIds = array();
foreach ($groups as $group) {
$groupIds[] = $group->getGID();
}
return $groupIds;
} else {
return array();
}

View File

@ -182,18 +182,6 @@ class Manager extends PublicEmitter {
$this->cachedUserGroups[$uid] = array_values($groups);
return $this->cachedUserGroups[$uid];
}
/**
* @param \OC\User\User $user
* @return array with group names
*/
public function getUserGroupIds($user) {
$groupIds = array();
foreach ($this->backends as $backend) {
$groupIds = array_merge($groupIds, $backend->getUserGroups($user->getUID()));
}
return $groupIds;
}
/**
* get a list of all display names in a group