PHP code example of anklimsk / cakephp-ldap-sync

1. Go to this page and download the library: Download anklimsk/cakephp-ldap-sync library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

anklimsk / cakephp-ldap-sync example snippets


   CakePlugin::load('CakeLdap', ['bootstrap' => true, 'routes' => true]);
   

       public $ldap = [
           'datasource' => 'CakeLdap.LdapExtSource',
           'persistent' => false,
           'host' => ['ldapsrv01', 'ldapsrv02'],
           'port' => 389,
           'login' => '[email protected]',
           'password' => 'pas$w0rd',
           'database' => '',
           'basedn' => 'dc=fabrikam,dc=com',
           'type' => 'ActiveDirectory',
           'tls' => false,
           'version' => 3,
       ];