PHP code example of sgomez / adldap2-bundle

1. Go to this page and download the library: Download sgomez/adldap2-bundle 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/ */

    

sgomez / adldap2-bundle example snippets



// app/AppKernel.php

public function registerBundles()
{
    $bundles = array(
        // ...
        new Sgomez\Bundle\Adldap2Bundle\Adldap2Bundle(),
        // ...
    );
}
yaml

class DefaultController extends Controller
{
    public function indexAction()
    {
        $user = $this->get('adldap2')->search()->find('username');
    }
}