2017 © Pedro Peláez
 

library ad-x

X-tremely powerful Active Directory interface for php

image

alaneor/ad-x

X-tremely powerful Active Directory interface for php

  • Monday, June 6, 2016
  • by Alaneor
  • Repository
  • 6 Watchers
  • 30 Stars
  • 1,676 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 8 Forks
  • 5 Open issues
  • 11 Versions
  • 3 % Grown

The README.md

AD-X :: Active Directory library for php

The AD-X library aims to provide an easy-to-use, object-oriented and powerful tool to work with Active Directory and related components, like Exchange., (*1)

Features

### The important ones

  • An understandable, object-oriented API to work with Active Directory
  • Automatic data conversion - with this library, you won't encounter a value that has to be converted to something else before you can work with it in php ( like unicodePwd or lastLogonTimestamp ) - you simply use the values and the library will take care of the conversion
  • User management / Microsoft Exchange mailbox management ( yes, you can create Exchange mailboxes / mail users with this! )
  • Support for paged searches
  • Support for referrals - useful if you operate on multiple domains in a forest
  • TLS or SSL encryption support
  • Directory Schema caching allows to perform checks, validations and provide guidance before you even attempt to modify anything on the server
  • Simple change tracking on your directory server
  • Selectors - a simple and elegant way to retrieve objects

### The nice to have ones

  • ldap v3 protocol support
  • Namespaced classes to prevent collisions
  • Exceptions-based error handling
  • Autoloading support via Composer
  • Object-to-json conversion for easy integration with your front-end
  • Optional simple ldap query builder

Installation

Requirements

Install:

Via Composer:

This will install the latest stable release:
composer require alaneor/ad-x:dev-master ( visit Packagist for list of all available versions ), (*2)

Generate the schema cache:

Create a new php script with the following contents, providing relevant information like domain and your domain credentials:, (*3)

    include './vendor/autoload.php'; // Include Composer's autoloader

    $link = new ADX\Core\Link( 'company.com', 389 ); // Connect to server on default port
    $link->bind( 'username@company.com', 'password' ); // Authenticate to the server
    ADX\Core\Schema::build( $link ); // Build the local schema cache ( takes some time, go get a coffee )

A future release will include a wizard-like script to guide you through the process right after installation., (*4)

Depending on the stability of your Active Directory environment, you might need to re-build the schema cache occasionally, especially after upgrading to a newer Active Directory functional level or after installing new directory-related components, like MS Exchange, OCS Services or similar., (*5)

Documentation

Documentation is currently available for the API only, but it includes a lot of examples and explanations. I recommend that you read the documentation in the following order:, (*6)

  • Link : How to connect to the directory and perform authentication
  • Task : How to search the directory and retrieve data
  • Object : How to work with retrieved objects and read/manipulate its attributes
  • Attribute : How to manipulate individual attributes and read/manipulate its values
  • User : How to work with users and manage Exchange mailboxes / mail users

Read online: API documentation

Generate the documentation locally:

  1. Download the library
  2. Install the dependencies using Composer:
composer install --dev
  1. Generate the API documentation using ApiGen ( installed by Composer ):
php ./vendor/bin/apigen.php
  1. Generated documentation will be available at ./docs/www/index.html

Known limitations

  • The ldap v2 protocol is not supported and never will be. Pull requests to provide backwards-compatibility will be refused.
  • The library has been built specifically for Active Directory. Compatibility with standards-based ldap servers like OpenLDAP is likely broken. I have no plans to address this at the moment but a future release might make such thing possible.
  • Unit tests are missing completely. I realise this might be a serious issue for future development and plan to address this with a future update. Any help with writing tests is much appreciated.

Future to-dos

  • Improve the API documentation
  • Provide "helper" classes to simplify working with computers, groups, contacts etc.
  • Write unit tests
  • Write tutorials

Found an issue / have idea?

Please submit issues and ideas to the Github's issue tracker., (*7)

Contributing rules will be provided in a future update - for now, please try to match the programming style currently used in the code when submitting pull requests., (*8)

License

This software is licensed under the BSD (3-Clause) License. See the LICENSE file for more information., (*9)

Appreciate

If you like this project and enjoy using it, feel free to spread the word about it wherever you wish., (*10)

You may also consider donating., (*11)

Via Flattr:

Flattr this, (*12)

The Versions

06/06 2016

dev-master

9999999-dev https://github.com/Alaneor/AD-X

X-tremely powerful Active Directory interface for php

  Sources   Download

BSD-3

The Requires

 

The Development Requires

ldap active directory

06/06 2016

0.3.4

0.3.4.0 https://github.com/Alaneor/AD-X

X-tremely powerful Active Directory interface for php

  Sources   Download

BSD-3

The Requires

 

The Development Requires

ldap active directory

15/01 2015

dev-develop

dev-develop https://github.com/Alaneor/AD-X

X-tremely powerful Active Directory interface for php

  Sources   Download

BSD-3-Clause

The Requires

 

The Development Requires

ldap active directory

05/05 2014

0.3.3

0.3.3.0 https://github.com/Alaneor/AD-X

X-tremely powerful Active Directory interface for php

  Sources   Download

BSD-3

The Requires

 

The Development Requires

ldap active directory

09/04 2014

0.3.2

0.3.2.0 https://github.com/Alaneor/AD-X

X-tremely powerful Active Directory interface for php

  Sources   Download

BSD-3

The Requires

 

The Development Requires

ldap active directory

27/08 2013

0.3.1

0.3.1.0 https://github.com/Alaneor/AD-X

X-tremely powerful Active Directory interface for php

  Sources   Download

BSD-3

The Requires

 

The Development Requires

ldap active directory

25/08 2013

0.3

0.3.0.0 https://github.com/Alaneor/AD-X

X-tremely powerful Active Directory interface for php

  Sources   Download

BSD-3

The Requires

 

The Development Requires

ldap active directory

20/08 2013

0.2.3

0.2.3.0 https://github.com/Alaneor/AD-X

X-tremely powerful interface to Active Directory

  Sources   Download

MIT

The Requires

  • php >=5.4.0
  • ext-ldap *
  • ext-json *
  • ext-openssl *

 

The Development Requires

ldap active directory

02/08 2013

0.2.2

0.2.2.0 https://github.com/Alaneor/AD-X

X-tremely powerful interface to Active Directory

  Sources   Download

MIT

The Requires

  • php >=5.4.0
  • ext-ldap *
  • ext-json *
  • ext-openssl *

 

The Development Requires

ldap active directory

01/08 2013

0.2.1

0.2.1.0 https://github.com/Alaneor/AD-X

X-tremely powerful interface to Active Directory

  Sources   Download

MIT

The Requires

  • php >=5.4.0
  • ext-ldap *
  • ext-json *
  • ext-openssl *

 

The Development Requires

ldap active directory

15/07 2013

0.2.0

0.2.0.0 https://github.com/Alaneor/AD-X

X-tremely powerful intefrace to Active Directory

  Sources   Download

MIT

The Requires

  • php >=5.4.0
  • ext-ldap *
  • ext-json *
  • ext-openssl *

 

The Development Requires

ldap active directory