[ Index ]

PHP Cross Reference of DokuWiki




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


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

Defines 2 classes

adLDAP:: (44 methods):

adLDAPException:: (0 methods):

Class: adLDAP  - X-Ref

getLdapConnection()   X-Ref
Get the active LDAP Connection

return: resource

getLdapBind()   X-Ref
Get the bind status

return: bool

getBaseDn()   X-Ref
Get the current base DN

return: string

group()   X-Ref
Get the group class interface

return: adLDAPGroups

user()   X-Ref
Get the userclass interface

return: adLDAPUsers

folder()   X-Ref
Get the folder class interface

return: adLDAPFolders

utilities()   X-Ref
Get the utils class interface

return: adLDAPUtils

contact()   X-Ref
Get the contacts class interface

return: adLDAPContacts

exchange()   X-Ref
Get the exchange class interface

return: adLDAPExchange

computer()   X-Ref
Get the computers class interface

return: adLDAPComputers

setAccountSuffix($accountSuffix)   X-Ref
Set the account suffix

return: void
param: string $accountSuffix

getAccountSuffix()   X-Ref
Get the account suffix

return: string

setDomainControllers(array $domainControllers)   X-Ref
Set the domain controllers array

return: void
param: array $domainControllers

getDomainControllers()   X-Ref
Get the list of domain controllers

return: void

setPort($adPort)   X-Ref
Sets the port number your domain controller communicates over

param: int $adPort

getPort()   X-Ref
Gets the port number your domain controller communicates over

return: int

setAdminUsername($adminUsername)   X-Ref
Set the username of an account with higher priviledges

return: void
param: string $adminUsername

getAdminUsername()   X-Ref
Get the username of the account with higher priviledges

This will throw an exception for security reasons

setAdminPassword($adminPassword)   X-Ref
Set the password of an account with higher priviledges

return: void
param: string $adminPassword

getAdminPassword()   X-Ref
Get the password of the account with higher priviledges

This will throw an exception for security reasons

setRealPrimaryGroup($realPrimaryGroup)   X-Ref
Set whether to detect the true primary group

return: void
param: bool $realPrimaryGroup

getRealPrimaryGroup()   X-Ref
Get the real primary group setting

return: bool

setUseSSL($useSSL)   X-Ref
Set whether to use SSL

return: void
param: bool $useSSL

getUseSSL()   X-Ref
Get the SSL setting

return: bool

setUseTLS($useTLS)   X-Ref
Set whether to use TLS

return: void
param: bool $useTLS

getUseTLS()   X-Ref
Get the TLS setting

return: bool

setUseSSO($useSSO)   X-Ref
Set whether to use SSO
Requires ldap_sasl_bind support. Be sure --with-ldap-sasl is used when configuring PHP otherwise this function will be undefined.

return: void
param: bool $useSSO

getUseSSO()   X-Ref
Get the SSO setting

return: bool

setRecursiveGroups($recursiveGroups)   X-Ref
Set whether to lookup recursive groups

return: void
param: bool $recursiveGroups

getRecursiveGroups()   X-Ref
Get the recursive groups setting

return: bool

__construct($options = array()   X-Ref
Default Constructor

Tries to bind to the AD domain over LDAP or LDAPs

return: bool
param: array $options Array of options to pass to the constructor

__destruct()   X-Ref
Default Destructor

Closes the LDAP connection

return: void

connect()   X-Ref
Connects and Binds to the Domain Controller

return: bool

close()   X-Ref
Closes the LDAP connection

return: void

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 $preventRebind

findBaseDn()   X-Ref
Find the Base DN of your domain controller

return: string

getRootDse($attributes = array("*", "+")   X-Ref
Get the RootDSE properties from a domain controller

return: array
param: array $attributes The attributes you wish to query e.g. defaultnamingcontext

getLastError()   X-Ref
Get last error from Active Directory

This function gets the last message from Active Directory
This may indeed be a 'Success' message but if you get an unknown error
it might be worth calling this function to see what errors were raised

return string

ldapSupported()   X-Ref
Detect LDAP support in php

return: bool

ldapSaslSupported()   X-Ref
Detect ldap_sasl_bind support in PHP

return: bool

adldap_schema($attributes)   X-Ref

return: array
param: array $attributes Attributes to be queried

encode8Bit(&$item, $key)   X-Ref
Convert 8bit characters e.g. accented characters to UTF8 encoded characters

randomController()   X-Ref
Select a random domain controller from your domain controller array

return: string

pingController($host)   X-Ref
Test basic connectivity to controller

return: bool

Class: adLDAPException  - X-Ref

adLDAP Exception Handler

Exceptions of this type are thrown on bind failure or when SSL is required but not configured
try {
$adldap = new adLDAP();
catch (adLDAPException $e) {
echo $e;