Lines Matching defs:group
58 * Add a group to a group
60 * @param string $parent The parent group name
61 * @param string $child The child group name
66 // Find the parent group's dn
73 // Find the child group's dn
91 * Add a user to a group
93 * @param string $group The group to add the user to
94 * @param string $user The user to add to the group
98 public function addUser($group, $user, $isGUID = false)
101 // and add it using the full DN of the group
109 // Find the group's dn
110 $groupInfo = $this->info($group, array("cn"));
127 * Add a contact to a group
129 * @param string $group The group to add the contact to
133 public function addContact($group, $contactDn)
136 // and add it using the full DN of the group
138 // Find the group's dn
139 $groupInfo = $this->info($group, array("cn"));
156 * Create a group
158 * @param array $attributes Default attributes of the group
190 * Delete a group account
192 * @param string $group The group to delete (please be careful here!)
196 public function delete($group) {
198 if ($group === null){ return "Missing compulsory field [group]"; }
200 $groupInfo = $this->info($group, array("*"));
209 * Remove a group from a group
211 * @param string $parent The parent group name
212 * @param string $child The child group name
243 * Remove a user from a group
245 * @param string $group The group to remove a user from
246 * @param string $user The AD user to remove from the group
250 public function removeUser($group, $user, $isGUID = false)
254 $groupInfo = $this->info($group, array("cn"));
277 * Remove a contact from a group
279 * @param string $group The group to remove a user from
280 * @param string $contactDn The DN of a contact to remove from the group
283 public function removeContact($group, $contactDn)
287 $groupInfo = $this->info($group, array("cn"));
304 * Return a list of groups in a group
306 * @param string $group The group to query
310 public function inGroup($group, $recursive = NULL)
315 // Search the directory for the members of a group
316 $info = $this->info($group, array("member","cn"));
325 $filter = "(&(objectCategory=group)(distinguishedName=" . $this->adldap->utilities()->ldapSlashes($groups[$i]) . "))";
330 // not a person, look for a group
332 $filter = "(&(objectCategory=group)(distinguishedName=" . $this->adldap->utilities()->ldapSlashes($groups[$i]) . "))";
353 * Return a list of members in a group
355 * @param string $group The group to query
356 * @param bool $recursive Recursively get group members
359 public function members($group, $recursive = NULL)
363 // Search the directory for the members of a group
364 $info = $this->info($group, array("member","cn"));
378 // not a person, look for a group
380 $filter = "(&(objectCategory=group)(distinguishedName=" . $this->adldap->utilities()->ldapSlashes($users[$i]) . "))";
409 * Group Information. Returns an array of raw information about a group.
410 * The group name is case sensitive
412 * @param string $groupName The group name to retrieve info about
425 $filter = "(&(objectCategory=group)(name=" . $this->adldap->utilities()->ldapSlashes($groupName) . "))";
437 * The group name is case sensitive
439 * @param string $groupName The group name to retrieve info about
459 * @param string $group The group to get the list from
462 public function recursiveGroups($group)
464 if ($group === NULL) { return false; }
470 array_push($stack, $group); // Initial Group to Start with
506 $filter = '(&(objectCategory=group)';
574 * Coping with AD not returning the primary group
578 * need to search each security group to find the true primary group
602 * Coping with AD not returning the primary group
618 $filter = "(&(objectCategory=group)(samaccounttype=" . adLDAP::ADLDAP_SECURITY_GLOBAL_GROUP . "))";