lilweb / ldap-bundle
LDAP acces library
Installs: 3 737
Dependents: 0
Suggesters: 0
Security: 0
Stars: 1
Watchers: 3
Forks: 0
Open Issues: 0
Requires
- php: >=5.3.0
- ext-ldap: *
This package is not auto-updated.
Last update: 2024-12-16 15:59:42 UTC
README
This bundle helps connecting to an existing LDAP server.
Installation
Add the dependency to your composer.json
file :
"lilweb/ldap-bundle" : "0.1.0"
Add the bundle to AppKernel.php
:
new Lilweb\LdapBundle\LilwebLdapBundle(),
Configuration
Add the following to your config.yml file :
lilweb_ldap: host: %ldap_client_host% port: %ldap_client_port% username: %ldap_client_username% password: %ldap_client_password% version: %ldap_client_version%
Usage
A new service called lilweb.ldap_connection
is now available in your container.
Example :
$entries = $this ->ldapConnection ->search( array( 'base_dn' => $this->params['base_dn'], 'filter' => sprintf('(&%s(%s=%s))', $filter, $this->params['name_attribute'], $this->ldapConnection->escape($username)) ) );
Technical information
- The connection is not made until a method on the connection is called.
- This bundle requires the PHP-ldap extension