--- sources.php.dist	Mon Apr 18 15:36:49 2005
+++ sources.php.dist.new	Mon Apr 18 15:35:18 2005
@@ -82,7 +82,7 @@
         'port' => 389,
         'tls' => false,
         'root' => 'ou=member_directory,o=netcenter.com',
-        'dn' => array('cn'),
+        'rdn_attr' => 'cn',
         'objectclass' => 'person',
         'filter' => '',
         'charset' => 'iso-8859-1'
@@ -246,7 +246,7 @@
         'bind_dn' => 'cn=admin,ou=users,dc=example,dc=com',
         'bind_password' => '********',
         'sizelimit' => 200,
-        'dn' => array('cn'),
+        'rdn_attr' => 'cn',
         'objectclass' => array('top',
                                'person',
                                'organizationalPerson','inetOrgPerson'),
@@ -300,6 +300,14 @@
 // First we need to get the uid.
 $uid = Auth::getBareAuth();
 $basedn = 'dc=example, dc=com';
+
+// A code reference to pass to the driver for auto-generating
+// our rdn_attr field at creation-time. No run-time params supported for now.
+$params = ''
+$code = 'return date("YmdHis");';
+$rdn_func = create_function($params, $code);
+
+
 $cfgSources['personal_ldap'] = array(
     'title' => _("My Addressbook"),
     'type' => 'ldap',
@@ -309,7 +317,8 @@
         'root' => 'ou=' . $uid . ',ou=personal_addressbook,' . $basedn,
         'bind_dn' => 'uid=' . $uid . ',ou=People,' . $basedn,
         'bind_password' => Auth::getCredential('password'),
-        'dn' => array('cn', 'uid'),
+        'rdn_attr' => 'uid',
+	'rdn_func' => $rdn_func,
         'objectclass' => array('top',
                                'person',
                                'inetOrgPerson',
@@ -537,7 +546,7 @@
             'tls' => false,
             'root' => $GLOBALS['conf']['kolab']['ldap']['basedn'],
             'sizelimit' => 200,
-            'dn' => array('cn'),
+            'rdn_attr' => 'cn',
             'objectclass' => array(
                 'top',
                 'inetOrgPerson'
