[ Index ] |
PHP Cross Reference of DokuWiki |
[Source view] [Print] [Project Stats]
PHP LDAP CLASS FOR MANIPULATING ACTIVE DIRECTORY Version 4.0.4 PHP Version 5 with SSL and LDAP support
Author: | Scott Barnett, Richard Hyland |
Copyright: | (c) 2006-2012 Scott Barnett, Richard Hyland |
License: | http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html LGPLv2.1 |
Link: | http://adldap.sourceforge.net/ |
Version: | 4.0.4 |
File Size: | 633 lines (23 kb) |
Included or required: | 0 times |
Referenced: | 0 times |
Includes or requires: | 0 files |
adLDAPGroups:: (20 methods):
__construct()
addGroup()
addUser()
addContact()
create()
delete()
removeGroup()
removeUser()
removeContact()
inGroup()
members()
info()
infoCollection()
recursiveGroups()
search()
all()
allSecurity()
allDistribution()
getPrimaryGroup()
cn()
Class: adLDAPGroups - X-Ref
GROUP FUNCTIONS__construct(adLDAP $adldap) X-Ref |
The current adLDAP connection via dependency injection |
addGroup($parent,$child) X-Ref |
Add a group to a group return: bool param: string $parent The parent group name param: string $child The child group name |
addUser($group, $user, $isGUID = false) X-Ref |
Add a user to a group return: bool param: string $group The group to add the user to param: string $user The user to add to the group param: bool $isGUID Is the username passed a GUID or a samAccountName |
addContact($group, $contactDn) X-Ref |
Add a contact to a group return: bool param: string $group The group to add the contact to param: string $contactDn The DN of the contact to add |
create($attributes) X-Ref |
Create a group return: bool param: array $attributes Default attributes of the group |
delete($group) X-Ref |
Delete a group account return: array param: string $group The group to delete (please be careful here!) |
removeGroup($parent , $child) X-Ref |
Remove a group from a group return: bool param: string $parent The parent group name param: string $child The child group name |
removeUser($group, $user, $isGUID = false) X-Ref |
Remove a user from a group return: bool param: string $group The group to remove a user from param: string $user The AD user to remove from the group param: bool $isGUID Is the username passed a GUID or a samAccountName |
removeContact($group, $contactDn) X-Ref |
Remove a contact from a group return: bool param: string $group The group to remove a user from param: string $contactDn The DN of a contact to remove from the group |
inGroup($group, $recursive = NULL) X-Ref |
Return a list of groups in a group return: array param: string $group The group to query param: bool $recursive Recursively get groups |
members($group, $recursive = NULL) X-Ref |
Return a list of members in a group return: array param: string $group The group to query param: bool $recursive Recursively get group members |
info($groupName, $fields = NULL) X-Ref |
Group Information. Returns an array of raw information about a group. The group name is case sensitive return: array param: string $groupName The group name to retrieve info about param: array $fields Fields to retrieve |
infoCollection($groupName, $fields = NULL) X-Ref |
Group Information. Returns an collection The group name is case sensitive return: adLDAPGroupCollection param: string $groupName The group name to retrieve info about param: array $fields Fields to retrieve |
recursiveGroups($group) X-Ref |
Return a complete list of "groups in groups" return: array param: string $group The group to get the list from |
search($sAMAaccountType = adLDAP::ADLDAP_SECURITY_GLOBAL_GROUP, $includeDescription = false, $search = "*", $sorted = true) X-Ref |
Returns a complete list of the groups in AD based on a SAM Account Type return: array param: string $sAMAaccountType The account type to return param: bool $includeDescription Whether to return a description param: string $search Search parameters param: bool $sorted Whether to sort the results |
all($includeDescription = false, $search = "*", $sorted = true) X-Ref |
Returns a complete list of all groups in AD return: array param: bool $includeDescription Whether to return a description param: string $search Search parameters param: bool $sorted Whether to sort the results |
allSecurity($includeDescription = false, $search = "*", $sorted = true) X-Ref |
Returns a complete list of security groups in AD return: array param: bool $includeDescription Whether to return a description param: string $search Search parameters param: bool $sorted Whether to sort the results |
allDistribution($includeDescription = false, $search = "*", $sorted = true) X-Ref |
Returns a complete list of distribution lists in AD return: array param: bool $includeDescription Whether to return a description param: string $search Search parameters param: bool $sorted Whether to sort the results |
getPrimaryGroup($gid, $usersid) X-Ref |
Coping with AD not returning the primary group http://support.microsoft.com/?kbid=321360 This is a re-write based on code submitted by Bruce which prevents the need to search each security group to find the true primary group return: mixed param: string $gid Group ID param: string $usersid User's Object SID |
cn($gid) X-Ref |
Coping with AD not returning the primary group http://support.microsoft.com/?kbid=321360 For some reason it's not possible to search on primarygrouptoken=XXX If someone can show otherwise, I'd like to know about it :) this way is resource intensive and generally a pain in the @#%^ return: string param: string $gid Group ID |