Branch '2.3-stable' - www/admin
Jeroen van Meeuwen
vanmeeuwen at kolabsys.com
Tue Apr 19 18:53:05 CEST 2011
www/admin/user/user.php | 8 +++++++-
1 file changed, 7 insertions(+), 1 deletion(-)
New commits:
commit eb180b7052b324431d8b745d18fdbc66beefb3a9
Author: Bogomil Shopov <shopov at kolabsys.com>
Date: Tue Apr 19 17:46:32 2011 +0100
Fix #75: Problems with new UID based dn
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 ) {
More information about the commits
mailing list