可配置的Matomo插件来创建LDAP连接,它可以被其他插件重用。它使用ZF2 Ldap组件:http://framework.zend.com/manual/2.3/en/index.html#zend-ldap

目前由https://github.com/plesk/Piwik-LdapVisitorInfo使用


查看并下载特定Matomo版本的插件:

这个插件是做什么的?

它根据您的配置创建到LDAP的连接。不多也不少:-)

我如何在另一个插件中使用这个LDAP连接?

这是一个检索连接的示例。有关文档,请参见http://framework.zend.com/manual/2.3/en/index.html#zend-ldap

命名空间Matomo (Piwik)\Plugins\YourPlugin;使用Matomo \插件;使用Matomo\Plugins\LdapConnectionPlesk\API作为APILdapConnectionPlesk;使用Zend \ Ldap \ Ldap;类YourPlugin extends插件{私有函数doSomething() {/* @var $ldap \Zend\ ldap \ ldap */ $ldap = APILdapConnectionPlesk::getInstance()->getConnection();ldap - >连接();$filter = sprintf('(&(objectclass=user)(samAccountName=%s))', $visitorUsername);$collection = $ldap->search($filter, null, ldap::SEARCH_SCOPE_SUB, ['displayname']);if ($collection->count() >= 1) {$result = $collection->getFirst();//处理结果… } } }
免费下载Matomo On-Premise亚博账号每天2000元出租这个插件不适用于Matomo WordPress

查看并下载特定Matomo版本的插件:


请分享

Baidu