Download the PHP package heimrichhannot/contao-ldap-bundle without Composer

On this page you can find all versions of the php package heimrichhannot/contao-ldap-bundle. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package contao-ldap-bundle

Contao LDAP Bundle

This bundle offers functionality concerning LDAP servers for the Contao CMS.

Features

Installation & configuration

  1. Run composer require heimrichhannot/contao-ldap-bundle.
  2. Update the database.
  3. IMPORTANT: Create a backup of your tables tl_user, tl_user_group, tl_member and tl_member_group just in case something goes wrong.
  4. Create your configuration as described in the section "Configuration".
  5. Clear the cache if your system is not in dev environment.

Configuration

Run vendor/bin/contao-console config:dump-reference huh_ldap to see the complete config reference.

A sample configuration for syncing backend users could be as follows (member configuration is nearly identical):

Technical details

How does the synchronization work?

Basically, by running the command vendor/bin/contao-console huh_ldap:sync_persons the users and groups are imported as specified in your config.yml configuration. You can do that initially to retrieve all users/members.

In addition, on login (backend and frontend), the data for the given username is retrieved from ldap and synced to the local entity (you can specify the field being used in your person_username_ldap_field config).

In most cases, you won't necessarily need to call the command as a cronjob every night, because the data is retrieved on demand on login. Nevertheless, if you need to have up-to-date data, you can call the command as often as you like ;-)

What if the users/members already exist locally and in the ldap directory?

If – by means of username – a user or member already exists in the local system and in the ldap directory but has not been "migrated", i.e. has a ldapUidNumber set in the database, yet?

In this case the match is done by the value of username in contao and in ldap (field is specified by person_username_ldap_field in your config). Then the corresponding ldapUidNumber is set and the data from the ldap directory is stored to the local user object so that everything is in sync.

In addition, per default, the following fields are synchronized from ldap to the local users/members:

What if the groups already exist locally and in the ldap directory?

Because groups don't have a unique field like "username" in the case of users, if you'd like to avoid that groups already existing both in ldap and local are added again locally, you need to set the ldapGidNumber in the corresponding tl_member/tl_user database records manually before importing.

Commands

Name Description Options
huh_ldap:sync_persons Synchronize the members/users as specified in your config.yml dry-run: See what the command would do without changing any data.
mode: Limit the command to users or members ("user" or "member"). Dismiss the parameter to do both.
uids: Limit the command to specific uids by providing a comma-separated list.

Events

Name Description
AfterPersonImport Run after a person is initially imported.
AfterPersonUpdate Run after a person is updated.

All versions of contao-ldap-bundle with dependencies

PHP Build Version
Package Version
Requires php Version ^7.4
contao/core-bundle Version ^4.9
ext-ldap Version *
symfony/ldap Version ^4.4
heimrichhannot/contao-utils-bundle Version ^2.196
heimrichhannot/contao-request-bundle Version ^1.2
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package heimrichhannot/contao-ldap-bundle contains the following files

Loading the files please wait ....