]> git.entuzijast.net Git - freeradius-dialup-admin.git/commitdiff
When updating ldap user information don't do an update if the new attribute value
authorkkalev <kkalev>
Wed, 14 Aug 2002 14:00:12 +0000 (14:00 +0000)
committerkkalev <kkalev>
Wed, 14 Aug 2002 14:00:12 +0000 (14:00 +0000)
is '-' (default value)

Changelog
lib/ldap/change_info.php3

index fd5aeda28a4e7ddceaba57698b9a3dd70c8c7d74..9ae2b8a01cacfba5e280aa207afd9a2f9fe52eba 100644 (file)
--- a/Changelog
+++ b/Changelog
@@ -1,6 +1,8 @@
 Ver 1.53:
 * html fixes in show_groups.php3
 * When reporting sql errors also print the output of da_sql_error
+* When updating ldap user information don't do an update if the new attribute value
+  is '-' (default value)
 Ver 1.52:
 * Add Reply-Message in conf/user_edit.attrs so that it appears in the user/group edit pages
 * Allow the administrator to specify a group in the New User page. Update lib/sql/create_user.php3 to add
index 48e10d0f4d4c78a6eef7f47f90f06371380038db..a4d4188006d97fc3793f21891abde9608e03c66d 100644 (file)
@@ -3,15 +3,15 @@
        if ($ds){
                $r = @ldap_bind($ds,"$config[ldap_binddn]",$config[ldap_bindpw]);
                if ($r){
-                       if ($Fcn != '' && $Fcn != $cn)
+                       if ($Fcn != '' && $Fcn != '-' && $Fcn != $cn)
                                $mod['cn'] = $Fcn;
-                       if ($Fmail != '' && $Fmail != $mail)
+                       if ($Fmail != '' && $Fmail != '-' && $Fmail != $mail)
                                $mod['mail'] = $Fmail;
-                       if ($Fou != '' && $Fou != $ou)
+                       if ($Fou != '' && $Fou != '-' && $Fou != $ou)
                                $mod['ou'] = $Fou;
-                       if ($Ftelephonenumber != '' && $Ftelephonenumber != $telephonenumber)
+                       if ($Ftelephonenumber != '' && $Ftelephonenumber != '-' && $Ftelephonenumber != $telephonenumber)
                                $mod['telephonenumber'] = $Ftelephonenumber;
-                       if ($Fhomephone != '' && $Fhomephone != $homephone)
+                       if ($Fhomephone != '' && $Fhomephone != '-' && $Fhomephone != $homephone)
                                $mod['homephone'] = $Fhomephone;
                        if ($dn != ''){
                                @ldap_mod_replace($ds,$dn,$mod);