summaryrefslogtreecommitdiffstats
path: root/lib/group
diff options
context:
space:
mode:
authorRobin Appelman <icewind@owncloud.com>2013-07-10 17:52:34 +0200
committerRobin Appelman <icewind@owncloud.com>2013-07-10 17:52:34 +0200
commit63df8f350084c2e90419419e425697da8eff8a27 (patch)
tree795aea828f5eaf31208d50c542296f7ac0436928 /lib/group
parent065bc96b02c6da881a08335f0b6b818350e9fcb8 (diff)
downloadnextcloud-server-63df8f350084c2e90419419e425697da8eff8a27.tar.gz
nextcloud-server-63df8f350084c2e90419419e425697da8eff8a27.zip
reneme id to gid
Diffstat (limited to 'lib/group')
-rw-r--r--lib/group/group.php30
1 files changed, 15 insertions, 15 deletions
diff --git a/lib/group/group.php b/lib/group/group.php
index fa106dd68f0..d4036b4361b 100644
--- a/lib/group/group.php
+++ b/lib/group/group.php
@@ -13,7 +13,7 @@ class Group {
/**
* @var string $id
*/
- private $id;
+ private $fid;
/**
* @var \OC\User\User[] $users
@@ -36,20 +36,20 @@ class Group {
private $userManager;
/**
- * @param string $id
+ * @param string $gid
* @param \OC_Group_Backend[] $backends
* @param \OC\User\Manager $userManager
* @param \OC\Hooks\PublicEmitter $emitter
*/
- public function __construct($id, $backends, $userManager, $emitter = null) {
- $this->id = $id;
+ public function __construct($gid, $backends, $userManager, $emitter = null) {
+ $this->gid = $gid;
$this->backends = $backends;
$this->userManager = $userManager;
$this->emitter = $emitter;
}
public function getGID() {
- return $this->id;
+ return $this->gid;
}
/**
@@ -66,7 +66,7 @@ class Group {
$userIds = array();
foreach ($this->backends as $backend) {
$diff = array_diff(
- $backend->usersInGroup($this->id),
+ $backend->usersInGroup($this->gid),
$userIds
);
if ($diff) {
@@ -89,7 +89,7 @@ class Group {
*/
public function inGroup($user) {
foreach ($this->backends as $backend) {
- if ($backend->inGroup($user->getUID(), $this->id)) {
+ if ($backend->inGroup($user->getUID(), $this->gid)) {
return true;
}
}
@@ -111,7 +111,7 @@ class Group {
}
foreach ($this->backends as $backend) {
if ($backend->implementsActions(OC_GROUP_BACKEND_ADD_TO_GROUP)) {
- $backend->addToGroup($user->getUID(), $this->id);
+ $backend->addToGroup($user->getUID(), $this->gid);
if ($this->users) {
$this->users[] = $user;
}
@@ -134,8 +134,8 @@ class Group {
$this->emitter->emit('\OC\Group', 'preRemoveUser', array($this, $user));
}
foreach ($this->backends as $backend) {
- if ($backend->implementsActions(OC_GROUP_BACKEND_REMOVE_FROM_GOUP) and $backend->inGroup($user->getUID(), $this->id)) {
- $backend->removeFromGroup($user->getUID(), $this->id);
+ if ($backend->implementsActions(OC_GROUP_BACKEND_REMOVE_FROM_GOUP) and $backend->inGroup($user->getUID(), $this->gid)) {
+ $backend->removeFromGroup($user->getUID(), $this->gid);
$result = true;
}
}
@@ -165,7 +165,7 @@ class Group {
public function searchUsers($search, $limit = null, $offset = null) {
$users = array();
foreach ($this->backends as $backend) {
- $userIds = $backend->usersInGroup($this->id, $search, $limit, $offset);
+ $userIds = $backend->usersInGroup($this->gid, $search, $limit, $offset);
if (!is_null($limit)) {
$limit -= count($userIds);
}
@@ -194,9 +194,9 @@ class Group {
$users = array();
foreach ($this->backends as $backend) {
if ($backend->implementsActions(OC_GROUP_BACKEND_GET_DISPLAYNAME)) {
- $userIds = array_keys($backend->displayNamesInGroup($this->id, $search, $limit, $offset));
+ $userIds = array_keys($backend->displayNamesInGroup($this->gid, $search, $limit, $offset));
} else {
- $userIds = $backend->usersInGroup($this->id, $search, $limit, $offset);
+ $userIds = $backend->usersInGroup($this->gid, $search, $limit, $offset);
}
if (!is_null($limit)) {
$limit -= count($userIds);
@@ -225,9 +225,9 @@ class Group {
$this->emitter->emit('\OC\Group', 'preDelete', array($this));
}
foreach ($this->backends as $backend) {
- if ($backend->implementsActions(OC_GROUP_BACKEND_DELETE_GROUP) and $backend->groupExists($this->id)) {
+ if ($backend->implementsActions(OC_GROUP_BACKEND_DELETE_GROUP) and $backend->groupExists($this->gid)) {
$result = true;
- $backend->deleteGroup($this->id);
+ $backend->deleteGroup($this->gid);
}
}
if ($result and $this->emitter) {