dpazuic / uic_ldap
dev-master
2018-02-19 20:35 UTC
Requires
- php: >5.3.0
This package is auto-updated.
Last update: 2024-09-20 14:42:00 UTC
README
PHP库,用于使用UIC LDAP
用法
要使用此库,您需要
- 将库包含到您的程序中
include_once('src/uic_ldap.php');
- 或使用composer
composer require dpazuic\uic_ldap
include_once('vendor/autoload.php');
- 实例化一个
dpazuic\uic_ldap
类的对象,并指定您想要查询的LDAP属性// (uid|ou|displayname|givenname|sn|mail|title| facsimiletelephonenumber|telephonenumber|postaladdress) allowed $ldap = new \dpazuic\uic_ldap("uid");
* Use one of the public search methods on the object
### By Single attribute
include_once('vendor/autoload.php'); $ldap = new \dpazuic\uic_ldap("uid"); $ldap->search("dpaz");
### By Multiple attributes
include_once('vendor/autoload.php'); $ldap = new \dpazuic\uic_ldap("ou"); $ldap->search(array("Student Systems Services", "Academic and Enrollm"));
## Examples:
You can use the attached `examples/cli.php` file from the command line to test functionality.
`php cli.php uid dpaz`. Be sure to run `composer dpazuic\uic_ldap` before attempting attemping to run `cli.php`.