From 750ee1daa1a6af2206f9df234a5da687e4a9fea2 Mon Sep 17 00:00:00 2001 From: kkalev Date: Sat, 7 Sep 2002 04:03:52 +0000 Subject: [PATCH] * In the user edit page print a message under the User Password field about if it exists or not. Update the user_info.php3 lib files to check for it. * In lib/ldap/defaults.php3 Dialup-Access should not be added in the default_vals. It is not inherited. --- Changelog | 3 +++ htdocs/user_edit.php3 | 6 ++++++ lib/ldap/defaults.php3 | 4 ++-- lib/ldap/user_info.php3 | 1 + lib/sql/user_info.php3 | 3 +++ 5 files changed, 15 insertions(+), 2 deletions(-) diff --git a/Changelog b/Changelog index 0db2a6e..1f74d85 100644 --- a/Changelog +++ b/Changelog @@ -13,6 +13,9 @@ Ver 1.56: attribute can be used for that. The same is very difficult to implement for sql, so for now user values overwrite default values in sql (user edit page). A lot of code and a lot of files where changed so there may be bugs somewhere. +* In the user edit page print a message under the User Password field about if it exists or not. Update + the user_info.php3 lib files to check for it. +* In lib/ldap/defaults.php3 Dialup-Access should not be added in the default_vals. It is not inherited. Ver 1.55: * Update the FAQ about missing attributes from the user/group edit pages and add a few comments in the configuration files diff --git a/htdocs/user_edit.php3 b/htdocs/user_edit.php3 index 86325c5..8779940 100644 --- a/htdocs/user_edit.php3 +++ b/htdocs/user_edit.php3 @@ -112,6 +112,12 @@ if ($user_type != 'group'){ User Password (changes only) +User password exists\n"; +else + echo "User password does not exist\n"; +?> diff --git a/lib/ldap/defaults.php3 b/lib/ldap/defaults.php3 index 3a91826..e37e2cd 100644 --- a/lib/ldap/defaults.php3 +++ b/lib/ldap/defaults.php3 @@ -10,7 +10,7 @@ if ($config[ldap_default_dn] != ''){ $dn = $info[0]['dn']; if ($dn != ''){ foreach($attrmap as $key => $val){ - if ($info[0]["$val"][0] != ''){ + if ($info[0]["$val"][0] != '' && $key != 'Dialup-Access'){ if ($attrmap[generic]["$key"] == 'generic'){ for($i=0;$i<$info[0]["$val"][count];$i++) $default_vals["$key"][] = $info[0]["$val"][$i]; @@ -33,7 +33,7 @@ if ($config[ldap_default_dn] != ''){ $dn3 = $info2[0]['dn']; if ($dn3 != ''){ foreach($attrmap as $key => $val){ - if ($info2[0]["$val"][0] != ''){ + if ($info2[0]["$val"][0] != '' && $key != 'Dialup-Access'){ if (!isset($default_vals["$key"])) $default_vals["$key"] = array(); if ($attrmap[generic]["$key"] == 'generic'){ diff --git a/lib/ldap/user_info.php3 b/lib/ldap/user_info.php3 index 56e069c..4974581 100644 --- a/lib/ldap/user_info.php3 +++ b/lib/ldap/user_info.php3 @@ -63,6 +63,7 @@ if ($ds) { $title_lang = decode_string("$title_lang", $k); $title_lang = ($title_lang) ? $title_lang : '-'; $mailalt = ($info[0]['mailalternateaddress'][0]) ? $info[0]['mailalternateaddress'][0] : '-'; + $user_password_exists = ($info[0]['userpassword'][0] != '') ? 'yes' : 'no'; foreach($attrmap as $key => $val){ $item_vals["$key"] = $info[0]["$val"]; } diff --git a/lib/sql/user_info.php3 b/lib/sql/user_info.php3 index e8bfdec..0bea692 100644 --- a/lib/sql/user_info.php3 +++ b/lib/sql/user_info.php3 @@ -32,6 +32,7 @@ $homephone = '-'; $mobile = '-'; $mail = '-'; $mailalt = '-'; +$user_password_exists = 'no'; unset($item_vals); unset($tmp); @@ -45,6 +46,8 @@ if ($link){ while(($row = @da_sql_fetch_array($res,$config))){ $attr = $row[Attribute]; $val = $row[Value]; + if ($attr == $config[sql_password_attribute] && $val != '') + $user_password_exists = 'yes'; if ($use_op){ $oper = $row[op]; $tmp["$attr"][operator][]="$oper"; -- 2.39.5