added type id to get LDAP filter

This commit is contained in:
Roland Gruber 2017-12-22 09:41:52 +01:00
parent ea33f2f5ac
commit 574ddbcbb6
2 changed files with 3 additions and 2 deletions

View File

@ -425,11 +425,12 @@ abstract class baseModule {
* <br>
* <b>Example:</b> return array('or' => '(objectClass=posixAccount)', 'and' => '(!(uid=*$))')
*
* @param string $typeId account type id
* @return string LDAP filter
*
* @see baseModule::get_metaData()
*/
public function get_ldap_filter() {
public function get_ldap_filter($typeId) {
if (isset($this->meta['ldap_filter'])) return $this->meta['ldap_filter'];
else return "";
}

View File

@ -101,7 +101,7 @@ function get_ldap_filter($typeId) {
$orFilter = '';
for ($i = 0; $i < sizeof($mods); $i++) {
$module = moduleCache::getModule($mods[$i], $type->getScope());
$modinfo = $module->get_ldap_filter();
$modinfo = $module->get_ldap_filter($typeId);
if (isset($modinfo['or'])) {
$filters['or'][] = $modinfo['or'];
}