apung / ldap
Laravel
v0.0.1
2014-11-29 20:33 UTC
Requires
- php: >=5.3.3
- illuminate/support: 4.2.*
This package is not auto-updated.
Last update: 2024-09-24 02:22:32 UTC
README
安装
composer require apung\ldap
集成
'providers' => array(
....
'Apung\Ldap\LdapServiceProvider',
....
),
使用
$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();
待办事项
待办事项
- CRUD(创建 / 读取 / 更新 / 删除)语句
- 文档