aboutsummaryrefslogtreecommitdiffstats
path: root/lib/private/Group
diff options
context:
space:
mode:
Diffstat (limited to 'lib/private/Group')
-rw-r--r--lib/private/Group/Group.php9
-rw-r--r--lib/private/Group/Manager.php8
2 files changed, 9 insertions, 8 deletions
diff --git a/lib/private/Group/Group.php b/lib/private/Group/Group.php
index 69dce215694..32ab79adab3 100644
--- a/lib/private/Group/Group.php
+++ b/lib/private/Group/Group.php
@@ -29,6 +29,7 @@
namespace OC\Group;
use OCP\IGroup;
+use OCP\IUser;
class Group implements IGroup {
/** @var null|string */
@@ -119,10 +120,10 @@ class Group implements IGroup {
/**
* check if a user is in the group
*
- * @param \OC\User\User $user
+ * @param IUser $user
* @return bool
*/
- public function inGroup($user) {
+ public function inGroup(IUser $user) {
if (isset($this->users[$user->getUID()])) {
return true;
}
@@ -138,9 +139,9 @@ class Group implements IGroup {
/**
* add a user to the group
*
- * @param \OC\User\User $user
+ * @param IUser $user
*/
- public function addUser($user) {
+ public function addUser(IUser $user) {
if ($this->inGroup($user)) {
return;
}
diff --git a/lib/private/Group/Manager.php b/lib/private/Group/Manager.php
index 61b47fdd448..6d4f5a091c6 100644
--- a/lib/private/Group/Manager.php
+++ b/lib/private/Group/Manager.php
@@ -246,10 +246,10 @@ class Manager extends PublicEmitter implements IGroupManager {
}
/**
- * @param \OC\User\User|null $user
+ * @param IUser|null $user
* @return \OC\Group\Group[]
*/
- public function getUserGroups($user) {
+ public function getUserGroups(IUser $user= null) {
if (!$user instanceof IUser) {
return [];
}
@@ -303,10 +303,10 @@ class Manager extends PublicEmitter implements IGroupManager {
/**
* get a list of group ids for a user
- * @param \OC\User\User $user
+ * @param IUser $user
* @return array with group ids
*/
- public function getUserGroupIds($user) {
+ public function getUserGroupIds(IUser $user) {
return array_map(function($value) {
return (string) $value;
}, array_keys($this->getUserGroups($user)));