summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--www/admin/user/user.php4
1 files changed, 2 insertions, 2 deletions
diff --git a/www/admin/user/user.php b/www/admin/user/user.php
index 7d757f2..215e792 100644
--- a/www/admin/user/user.php
+++ b/www/admin/user/user.php
@@ -706,7 +706,7 @@ switch( $action ) {
if ( !$errors ) {
// Try to rename the object
- if (!ldap_rename($ldap->connection, $dn, "cn=" . $ldap->dn_escape($ldap_object['cn']), $domain_dn, true)) {
+ if (!ldap_rename($ldap->connection, $dn, $new_uid, $domain_dn, true)) {
array_push($errors, sprintf(_("LDAP Error: could not rename %s to %s: %s"), $dn,
$newdn, ldap_error($ldap->connection)));
}
@@ -715,7 +715,7 @@ switch( $action ) {
if (!ldap_modify($ldap->connection, $newdn, $ldap_object)) {
// While this should not happen, in case it does, we need to revert the
// renaming
- array_push($errors, sprintf(_("LDAP Error: could not modify %s to %s: %s"), $newdn,
+ array_push($errors, sprintf(_("LDAP Error: could not modify %s: %s"), $newdn,
ldap_error($ldap->connection)));
$old_dn = substr($dn, 0, strlen($dn) - strlen($domain_dn) - 1);
ldap_rename($ldap->connection, $newdn, $old_dn, $domain_dn, true);