[ Index ]

PHP Cross Reference of DokuWiki

title

Body

[close]

/lib/plugins/authad/adLDAP/classes/ -> adLDAPUsers.php (summary)

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: 682 lines (28 kb)
Included or required:0 times
Referenced: 0 times
Includes or requires: 0 files

Defines 1 class

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

return: bool
param: string $username A user's AD username
param: string $password A user's AD password
param: bool optional $prevent_rebind

create($attributes)   X-Ref
Create a user

If you specify a password here, this can only be performed over SSL

return: bool
param: array $attributes The attributes to set to the user account

accountControl($options)   X-Ref
Account control options

return: int
param: array $options The options to convert to int

delete($username, $isGUID = false)   X-Ref
Delete a user account

return: array
param: string $username The username to delete (please be careful here!)
param: bool $isGUID Is the username a GUID or a samAccountName

groups($username, $recursive = NULL, $isGUID = false)   X-Ref
Groups the user is a member of

return: array
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

info($username, $fields = NULL, $isGUID = false)   X-Ref
Find information about the users. Returned in a raw array format from AD

return: array
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

infoCollection($username, $fields = NULL, $isGUID = false)   X-Ref
Find information about the users. Returned in a raw array format from AD

return: mixed
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

inGroup($username, $group, $recursive = NULL, $isGUID = false)   X-Ref
Determine if a user is in a specific group

return: bool
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

passwordExpiry($username, $isGUID = false)   X-Ref
Determine a user's password expiry date

return: array
param: string $username The username to query
param: book $isGUID Is the username passed a GUID or a samAccountName

modify($username, $attributes, $isGUID = false)   X-Ref
Modify a user

return: bool
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

disable($username, $isGUID = false)   X-Ref
Disable a user account

return: bool
param: string $username The username to disable
param: bool $isGUID Is the username passed a GUID or a samAccountName

enable($username, $isGUID = false)   X-Ref
Enable a user account

return: bool
param: string $username The username to enable
param: bool $isGUID Is the username passed a GUID or a samAccountName

password($username, $password, $isGUID = false)   X-Ref
Set the password of a user - This must be performed over SSL

return: bool
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

encodePassword($password)   X-Ref
Encode a password for transmission over LDAP

return: string
param: string $password The password to encode

dn($username, $isGUID=false)   X-Ref
Obtain the user's distinguished name based on their userid

return: string
param: string $username The username
param: bool $isGUID Is the username passed a GUID or a samAccountName

all($includeDescription = false, $search = "*", $sorted = true)   X-Ref
Return a list of all users in AD

return: array
param: bool $includeDescription Return a description of the user
param: string $search Search parameter
param: bool $sorted Sort the user accounts

usernameToGuid($username)   X-Ref
Converts a username (samAccountName) to a GUID

return: string
param: string $username The username to query

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

return: array
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

move($username, $container)   X-Ref
Move a user account to a different OU

return: array
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!).

getLastLogon($username)   X-Ref
Get the last logon time of any user as a Unix timestamp

return: long $unixTimestamp
param: string $username