8000 GitHub - ltb-project/ltb-common at v0.1.0
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

ltb-project/ltb-common

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

27 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

LDAP Tool Box PHP framework

Latest Stable Version Latest Unstable Version Total Downloads

Presentation

This is a PHP library to share code between LTB applications like Self Service Password, White Pages, Service Desk, ...

Installation

Add the dependency in your composer configuration:

{
    "require": {
        "ltb-project/ldap": "v0.1"
    }
}

Then update dependencies:

composer update

Use autoloading in your code to load composer dependencies:

require __DIR__ . 'vendor/autoload.php';

Usage

LDAP connection

$ldap_url = "ldap://ldap.example.com";
$ldap_starttls = false;
$dn = "cn=admin,dc=example,dc=com";
$password = "secret";
$ldap_network_timeout = 3;

$ldap_connection = \Ltb\Ldap::connect($ldap_url, $ldap_starttls, $dn, $password, $ldap_network_timeout);

$ldap = $ldap_connection[0];
$result = $ldap_connection[1];

if (!$result) {
    error_log("Unable to connect to $ldap_url");
    exit 1;
}

About

PHP framework for LTB project applications

Topics

Resources

License

Stars

Watchers

Forks

Contributors 3

  •  
  •  
  •  
0