diff options
author | Bogomil Shopov <shopov@kolabsys.com> | 2011-04-19 16:46:32 (GMT) |
---|---|---|
committer | Jeroen van Meeuwen (Kolab Systems) <vanmeeuwen@kolabsys.com> | 2011-04-19 16:46:32 (GMT) |
commit | 99c56cc511f48d50fab19018268cda3aee94e5f6 (patch) | |
tree | 0346a63b113449a2fbf93250ed063c495fc84af0 /www/admin | |
parent | ece93f38cc1ba81ddebc5f6dc2129f2bbd60c9c4 (diff) | |
download | kolab-webadmin-99c56cc511f48d50fab19018268cda3aee94e5f6.tar.gz |
Fix #75: Problems with new UID based dn
Diffstat (limited to 'www/admin')
-rw-r--r-- | www/admin/user/user.php | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/www/admin/user/user.php b/www/admin/user/user.php index 7ba9d27..7d757f2 100644 --- a/www/admin/user/user.php +++ b/www/admin/user/user.php @@ -662,6 +662,9 @@ switch( $action ) { if ($action == "save") { if (!$errors) { + // We need the unmodified uid rdn for renaming + $new_uid = "uid=" . $ldap->dn_escape($ldap_object['uid']); + if (!empty($ldap_object['uid'])) $newdn = "uid=".$ldap->dn_escape($ldap_object['uid']).",".$domain_dn; else $newdn = $dn; if (strcmp($dn,$newdn) != 0) { @@ -674,7 +677,10 @@ switch( $action ) { if (($result=ldap_read($ldap->connection,$dn,"(objectclass=*)")) && ($entry=ldap_first_entry($ldap->connection,$result)) && ($oldattrs=ldap_get_attributes($ldap->connection,$entry))) { - $ldap_object['uid'] = $oldattrs['uid'][0]; + + // This is no longer necessary. + //$ldap_object['uid'] = $oldattrs['uid'][0]; + $ldap_object['mail'] = $oldattrs['mail'][0]; unset( $oldattrs['count'] ); foreach( $oldattrs as $k => $v ) { |