[ 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: | 684 lines (28 kb) |
Included or required: | 0 times |
Referenced: | 0 times |
Includes or requires: | 0 files |
adLDAPUsers:: (21 methods):
__construct()
authenticate()
create()
accountControl()
delete()
groups()
info()
infoCollection()
inGroup()
passwordExpiry()
modify()
disable()
enable()
password()
encodePassword()
dn()
all()
usernameToGuid()
find()
move()
getLastLogon()
Class: adLDAPUsers - X-Ref
USER FUNCTIONS__construct(adLDAP $adldap) X-Ref |
The current adLDAP connection via dependency injection |
authenticate($username, $password, $preventRebind = false) X-Ref |
Validate a user's login credentials param: string $username A user's AD username param: string $password A user's AD password param: bool optional $prevent_rebind return: bool |
create($attributes) X-Ref |
Create a user If you specify a password here, this can only be performed over SSL param: array $attributes The attributes to set to the user account return: bool |
accountControl($options) X-Ref |
Account control options param: array $options The options to convert to int return: int |
delete($username, $isGUID = false) X-Ref |
Delete a user account param: string $username The username to delete (please be careful here!) param: bool $isGUID Is the username a GUID or a samAccountName return: array |
groups($username, $recursive = NULL, $isGUID = false) X-Ref |
Groups the user is a member of param: string $username The username to query param: bool $recursive Recursive list of groups param: bool $isGUID Is the username passed a GUID or a samAccountName return: array |
info($username, $fields = NULL, $isGUID = false) X-Ref |
Find information about the users. Returned in a raw array format from AD param: string $username The username to query param: array $fields Array of parameters to query param: bool $isGUID Is the username passed a GUID or a samAccountName return: array |
infoCollection($username, $fields = NULL, $isGUID = false) X-Ref |
Find information about the users. Returned in a raw array format from AD param: string $username The username to query param: array $fields Array of parameters to query param: bool $isGUID Is the username passed a GUID or a samAccountName return: mixed |
inGroup($username, $group, $recursive = NULL, $isGUID = false) X-Ref |
Determine if a user is in a specific group param: string $username The username to query param: string $group The name of the group to check against param: bool $recursive Check groups recursively param: bool $isGUID Is the username passed a GUID or a samAccountName return: bool |
passwordExpiry($username, $isGUID = false) X-Ref |
Determine a user's password expiry date param: string $username The username to query param: book $isGUID Is the username passed a GUID or a samAccountName return: array |
modify($username, $attributes, $isGUID = false) X-Ref |
Modify a user param: string $username The username to query param: array $attributes The attributes to modify. Note if you set the enabled attribute you must not specify any other attributes param: bool $isGUID Is the username passed a GUID or a samAccountName return: bool |
disable($username, $isGUID = false) X-Ref |
Disable a user account param: string $username The username to disable param: bool $isGUID Is the username passed a GUID or a samAccountName return: bool |
enable($username, $isGUID = false) X-Ref |
Enable a user account param: string $username The username to enable param: bool $isGUID Is the username passed a GUID or a samAccountName return: bool |
password($username, $password, $isGUID = false) X-Ref |
Set the password of a user - This must be performed over SSL param: string $username The username to modify param: string $password The new password param: bool $isGUID Is the username passed a GUID or a samAccountName return: bool |
encodePassword($password) X-Ref |
Encode a password for transmission over LDAP param: string $password The password to encode return: string |
dn($username, $isGUID=false) X-Ref |
Obtain the user's distinguished name based on their userid param: string $username The username param: bool $isGUID Is the username passed a GUID or a samAccountName return: string |
all($includeDescription = false, $search = "*", $sorted = true) X-Ref |
Return a list of all users in AD param: bool $includeDescription Return a description of the user param: string $search Search parameter param: bool $sorted Sort the user accounts return: array |
usernameToGuid($username) X-Ref |
Converts a username (samAccountName) to a GUID param: string $username The username to query return: string |
find($includeDescription = false, $searchField = false, $searchFilter = false, $sorted = true) X-Ref |
Return a list of all users in AD that have a specific value in a field param: bool $includeDescription Return a description of the user param: string $searchField Field to search search for param: string $searchFilter Value to search for in the specified field param: bool $sorted Sort the user accounts return: array |
move($username, $container) X-Ref |
Move a user account to a different OU param: string $username The username to move (please be careful here!) param: array $container The container or containers to move the user to (please be careful here!). return: array |
getLastLogon($username) X-Ref |
Get the last logon time of any user as a Unix timestamp param: string $username return: long $unixTimestamp |