apung / eldap by apung

Laravel
23
1
2
Package Data
Maintainer Username: apung
Maintainer Contact: apung.dama@gmail.com (Abdul Gaffur A Dama)
Package Create Date: 2014-11-29
Package Last Update: 2014-12-03
Language: PHP
License: BSD-3-Clause
Last Refreshed: 2024-04-18 15:00:54
Package Statistics
Total Downloads: 23
Monthly Downloads: 0
Daily Downloads: 0
Total Stars: 1
Total Watchers: 2
Total Forks: 0
Total Open Issues: 0

Laravel and LDAP

Build Status Total Downloads Latest Stable Version Latest Unstable Version License

Installing

composer require apung\ldap

Integrating

'providers' => array(
    ....
    'Apung\Ldap\LdapServiceProvider',
    ....
),

Usage

$options = array(
            'host'=>'ldap.example.com',
            'port'=>389,
            'base_dn'=>'dc=example,dc=com',
            'bind_rdn'=>'cn=admin,dc=example,dc=com',
            'bind_pw'=>'ManagerPassword!!!'
        );

$ldap = new \Apung\Ldap\Ldap($options);

//search person (which have uid) inside ou=people,dc=exampe,dc=com
$select = $ldap->select('uid')->from('ou=people,dc=example,dc=com')->where(array('uid'=>'*'))->get();

//like above, but return DN
$select = $ldap->select('uid')->from('ou=people,dc=example,dc=com')->where(array('uid'=>'*'))->withdn()->get();

//like above, but return all attributes (inside select statement)
$select = $ldap->select(array('uid','givenname'))->from('ou=people,dc=example,dc=com')->where(array('uid'=>'*'))->getAll();

TODO

TODO:

  • CRUD (Create / Read / Update / Delete) statements
  • Documentation