Configurable piwik plugin to create an LDAP connection, which can be reused by other plugins. Is uses the ZF2 Ldap component:

Currently used by

Why is PIWIK 2.5 required?

Because the configuration (to be explicit accountFilterFormat) is destroyed in the previous version See the ticket here:

What does this plugin do?

It creates based on your configuration a connection to LDAP. Not more and not less :-)

How can i use this LDAP connection in another plugin?

This is an example to retrieve the connection. For documentation please see

namespace Matomo (Piwik)\Plugins\YourPlugin;

use Matomo\Plugin;
use Matomo\Plugins\LdapConnection\API as APILdapConnection;
use Zend\Ldap\Ldap;

class YourPlugin extends Plugin
    private function doSomething()
        /* @var $ldap \Zend\Ldap\Ldap */
        $ldap = APILdapConnection::getInstance()->getConnection();

        $filter = sprintf('(&(objectclass=user)(samAccountName=%s))', $visitorUsername);
        $collection = $ldap->search($filter, null, Ldap::SEARCH_SCOPE_SUB, ['displayname']);

        if ($collection->count() >= 1) {
            $result = $collection->getFirst();
            //do something with the result...

Please share