note 34849 rejected from function.ldap-rename by didou
| From: | didou@php.net | Date: | Fri, 08 Aug 2003 13:37:51 +0000 |
| Subject: | note 34849 rejected from function.ldap-rename by didou | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-53646@lists.php.net to get a copy of this message | ||
Note Submitter: amedici@fr.netcentrex.net
----
bug report
THE ldap_rename function DOES NOT support renaming dn !
in fact it's much an ldap_move function than ldap_rename instead of C API !
If you try to rename an object such as :
$objectdn = "uniqueID=MyObject-12".$parentDN;
$newObjectdn = "uniqueID=MyObject-12a";
$parentDN = "ou=MyObjectClass,ou=mycontainer,ou=mycompagny";
the function:
ldap_rename($LDAPds,$objectdn,$newObjectdn,$parentDN,true);
or
ldap_rename($LDAPds,$objectdn,$newObjectdn,NULL,true);
will NOT work and will not return any error message by
ldap_error($LDAPds);
to rename a dn and not only move an object You have to
read all attributes of you object (uniqueID=MyObject-12)
keep them in memory
delete your object
then create your new object (MyObject-12a)
by using the basic ldap functions
hope new versions can fix this behavior