PHP code example of fabien44300 / openldap

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

    

fabien44300 / openldap example snippets

 bash
public function createOrUpdateUserFromLdap($identifier, $ldapDataUser)
{
....
}
 bash
use Config;
...
public function getAuthIdentifier()
{
$fieldAuthUser = Config::get('ldap.fieldAuthUser');
return $this->$fieldAuthUser;
}

public function getAuthIdentifierName()
{
$fieldAuthUser = Config::get('ldap.fieldAuthUser');
return $this->$fieldAuthUser;
}
 bash
php artisan make:auth
 bash
use Config;
...
public function username()
{
return Config::get('ldap.fieldAuthUser');
}