From bd702ef367fd0e466e434d192f37f79dc216ec49 Mon Sep 17 00:00:00 2001 From: kkalev Date: Sun, 12 Jan 2003 11:15:03 +0000 Subject: [PATCH] Fix a small bug in lib/ldap/create_user.php3. Unset the mod array before adding any values to it --- Changelog | 1 + lib/ldap/change_passwd.php3 | 2 +- lib/ldap/create_user.php3 | 1 + 3 files changed, 3 insertions(+), 1 deletion(-) diff --git a/Changelog b/Changelog index 11cfc3d..ffefbe7 100644 --- a/Changelog +++ b/Changelog @@ -30,6 +30,7 @@ Ver 1.62: * In debug, output the sql queries in italic. Refer to enabling debugging in the FAQ * Don't include user_info.php3 in the user_test page. * Make things a little bit more simple in lib/ldap/change_attrs.php3 +* Fix a small bug in lib/ldap/create_user.php3. Unset the mod array before adding any values to it. Ver 1.61: * Add a string encoder for greek * If general_decode_normal_attributes is set then encode attributes in lib/ldap/change_info. In the near future diff --git a/lib/ldap/change_passwd.php3 b/lib/ldap/change_passwd.php3 index e68d526..3fe0be9 100644 --- a/lib/ldap/change_passwd.php3 +++ b/lib/ldap/change_passwd.php3 @@ -12,7 +12,7 @@ require_once('../lib/ldap/functions.php3'); $passwd = da_encrypt($passwd); $passwd = '{' . $config[general_encryption_method] . '}' . $passwd; $mod[$attrmap['User-Password']] = $passwd; - if ($config[ldap_debug] == 'true') + if ($config[ldap_debug] == 'true'){ print "DEBUG(LDAP): ldap_mod_replace(): DN='$dn'
\n"; print "DEBUG(LDAP): ldap_mod_replace(): Data:"; print_r($mod); diff --git a/lib/ldap/create_user.php3 b/lib/ldap/create_user.php3 index 00856fe..dbc94c2 100644 --- a/lib/ldap/create_user.php3 +++ b/lib/ldap/create_user.php3 @@ -53,6 +53,7 @@ require_once('../lib/ldap/functions.php3'); continue; if ( $$attrmap["$key"] == '') continue; + unset($mod); $mod[$attrmap["$key"]] = $$attrmap["$key"]; if ($config[ldap_debug] == 'true'){ -- 2.39.5