added type id to get LDAP filter
This commit is contained in:
parent
ea33f2f5ac
commit
574ddbcbb6
|
@ -425,11 +425,12 @@ abstract class baseModule {
|
||||||
* <br>
|
* <br>
|
||||||
* <b>Example:</b> return array('or' => '(objectClass=posixAccount)', 'and' => '(!(uid=*$))')
|
* <b>Example:</b> return array('or' => '(objectClass=posixAccount)', 'and' => '(!(uid=*$))')
|
||||||
*
|
*
|
||||||
|
* @param string $typeId account type id
|
||||||
* @return string LDAP filter
|
* @return string LDAP filter
|
||||||
*
|
*
|
||||||
* @see baseModule::get_metaData()
|
* @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'];
|
if (isset($this->meta['ldap_filter'])) return $this->meta['ldap_filter'];
|
||||||
else return "";
|
else return "";
|
||||||
}
|
}
|
||||||
|
|
|
@ -101,7 +101,7 @@ function get_ldap_filter($typeId) {
|
||||||
$orFilter = '';
|
$orFilter = '';
|
||||||
for ($i = 0; $i < sizeof($mods); $i++) {
|
for ($i = 0; $i < sizeof($mods); $i++) {
|
||||||
$module = moduleCache::getModule($mods[$i], $type->getScope());
|
$module = moduleCache::getModule($mods[$i], $type->getScope());
|
||||||
$modinfo = $module->get_ldap_filter();
|
$modinfo = $module->get_ldap_filter($typeId);
|
||||||
if (isset($modinfo['or'])) {
|
if (isset($modinfo['or'])) {
|
||||||
$filters['or'][] = $modinfo['or'];
|
$filters['or'][] = $modinfo['or'];
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue