Skip to content

adLDAP Developer API Reference

Rich2k edited this page Apr 18, 2013 · 9 revisions

adLDAP Developer API Reference

This documentation relates to version 4.0 branch of adLDAP. Version 4 is not backwards compatible with code written for prior versions. For documentation on versions prior to version 4.0, please visit this page

This API is intended to be an accurate representation of the current version of the class. A great deal of knowledge is involved in the LDAP schema, so we actively encourage people to add to this documentation if you are able to improve it....

Version 4.0 of adLDAP is a complete re-write of the library and is not backwards compatible with older versions. Please take time to read the documentation to see how to use this class.

Server Requirements

Using adLDAP

Read the documentation on connecting and disconnecting from your domain controller for more information on different ways of calling adLDAP.

  1. Copy the contents of the src folder to your server

  2. Edit the configuring variables in the class itself if you so wish to

  3. From your script add the following code

    require_once(dirname(FILE) . '/adLDAP.php'); $adldap = new adLDAP();

It would be better to wrap it in a try/catch though

try {
    $adldap = new adLDAP();
}
catch (adLDAPException $e) {
    echo $e;
    exit();   
}

You can alternatively override the configuration when the class is called by specifying an array with the options.

You can call adLDAP as follows $adldap = new adLDAP($options); where $options is an array with one or more of the following keys

accountSuffix baseDn domainControllers adminUsername adminPassword realPrimaryGroup useSSL useTLS recursiveGroups adPort

See the 'examples' and 'connecting and disconnecting' section for more information

API Function Reference Guide

Calling adLDAP

Configuration

Functions

Error Handling

Active Directory Schema

Miscellaneous