move reading of suffix list
This commit is contained in:
parent
a6330b41e2
commit
7f6574af8c
|
@ -19,6 +19,7 @@
|
|||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
@ -48,8 +49,15 @@ This is a list of API changes for all LAM releases.
|
|||
<br>
|
||||
|
||||
<h2>5.5 -> 5.6</h2>
|
||||
Functions in lib/types.inc got namespace LAM/TYPES (e.g. getTypeAlias()).<br>
|
||||
New API to access configured account types: LAM\TYPES\TypeManager.<br>
|
||||
<ul>
|
||||
<li>
|
||||
Functions in lib/types.inc got namespace LAM/TYPES (e.g. getTypeAlias()).</li>
|
||||
<li>
|
||||
New API to access configured account types: LAM\TYPES\TypeManager.</li>
|
||||
<li>class baseType: new function getSuffixFilter()<br>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
|
||||
<h2>5.4 -> 5.5</h2>Functions Ldap::encrypt/decrypt in ldap.inc moved to lamEncrypt/lamDecrypt in security.inc.<br>
|
||||
<br>
|
||||
|
|
|
@ -129,6 +129,15 @@ class baseType {
|
|||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the LDAP filter to find the possible suffixes for this account type.
|
||||
*
|
||||
* @return string LDAP filter
|
||||
*/
|
||||
public function getSuffixFilter() {
|
||||
return "(|(objectClass=organizationalunit)(objectClass=country)(objectClass=organization)(objectClass=krbRealmContainer)(objectClass=container))";
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns a list of LDAP suffixes for this type.
|
||||
*
|
||||
|
@ -144,7 +153,7 @@ class baseType {
|
|||
$connection = $_SESSION['ldapHandle'];
|
||||
}
|
||||
$ret = array();
|
||||
$filter = "(|(objectClass=organizationalunit)(objectClass=country)(objectClass=organization)(objectClass=krbRealmContainer)(objectClass=container))";
|
||||
$filter = $this->getSuffixFilter();
|
||||
$sr = @ldap_search($connection, escapeDN($suffix),$filter , array('dn', 'objectClass'), 0, 0, 0, LDAP_DEREF_NEVER);
|
||||
if ($sr) {
|
||||
$units = ldap_get_entries($connection, $sr);
|
||||
|
|
Loading…
Reference in New Issue