new type API

This commit is contained in:
Roland Gruber 2017-06-11 21:15:41 +02:00
parent 6d91963df0
commit 6d52216a09
4 changed files with 14 additions and 4 deletions

View File

@ -21,6 +21,7 @@
@ -58,7 +59,7 @@ This is a list of API changes for all LAM releases.
<br>
<h2>5.7 -&gt; 5.8</h2>
<h2>5.7 -&gt; 6.0</h2>
<ul>
<li>All account types allow multiple configurations by default.</li>
<li>the following&nbsp; methods in baseModule have a new parameter $typeId:</li>
@ -72,10 +73,12 @@ This is a list of API changes for all LAM releases.
<li>getLDAPAliases() <br>
</li>
<li>get_uploadColumns()</li>
<li>build_uploadAccounts()<br>
<li>build_uploadAccounts()</li>
<li>get_RDNAttributes()<br>
</li>
</ul>
<li>baseType-&gt;doUploadPostActions(): new parameter $selectedModules<br>
</li>

View File

@ -574,6 +574,12 @@
version. Unless explicitly noticed there is no need to install an
intermediate release.</para>
<section>
<title>5.7 -&gt; 6.0</title>
<para>No actions needed.</para>
</section>
<section>
<title>5.6 -&gt; 5.7</title>

View File

@ -462,11 +462,12 @@ abstract class baseModule {
* <br>
* <b>Example:</b> return array('uid' => 'normal', 'cn' => 'low')
*
* @param string $typeId account type
* @return array list of attributes
*
* @see baseModule::get_metaData()
*/
public function get_RDNAttributes() {
public function get_RDNAttributes($typeId) {
if (isset($this->meta['RDN'])) return $this->meta['RDN'];
else return array();
}

View File

@ -164,7 +164,7 @@ function getRDNAttributes($typeId, $selectedModules=null) {
for ($i = 0; $i < sizeof($mods); $i++) {
// get list of attributes
$module = moduleCache::getModule($mods[$i], \LAM\TYPES\getScopeFromTypeId($typeId));
$attrs = $module->get_RDNAttributes();
$attrs = $module->get_RDNAttributes($typeId);
$keys = array_keys($attrs);
// sort attributes
for ($k = 0; $k < sizeof($keys); $k++) {