Module HowTo - Defining the RDN


Every LDAP DN starts with a RDN (relative DN). This is the value of a LDAP attribute. Users usually use "uid", groups use "cn".
You can provide a list of suitable RDN attributes for your module and give them a priority, too.

You will need to implement the function get_RDNAttributes() or use meta['RDN'].

Example:

The posixAccount module offers to create accounts with DNs uid=foo,dc=.... and cn=foo,dc=...
The uid attribute has a higher priority as it is the usual attribute for Unix accounts.

    /**
    * Returns meta data that is interpreted by parent class
    *
    * @return array array with meta data
    */
    function get_metaData() {
        $return = array();
        // RDN attributes
        $return["RDN"] = array("uid" => "normal", "cn" => "low");
        [...]