]> git.entuzijast.net Git - freeradius-dialup-admin.git/commitdiff
* In the user edit page print a message under the User Password field about if it...
authorkkalev <kkalev>
Sat, 7 Sep 2002 04:03:52 +0000 (04:03 +0000)
committerkkalev <kkalev>
Sat, 7 Sep 2002 04:03:52 +0000 (04:03 +0000)
  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
htdocs/user_edit.php3
lib/ldap/defaults.php3
lib/ldap/user_info.php3
lib/sql/user_info.php3

index 0db2a6e14fc29d40a68f41f3aba7d36b3887cc70..1f74d85423cf2018357e8c93164bf6a393ca0bf7 100644 (file)
--- 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
index 86325c514e790657d7e6e367495e02858c465350..8779940bf5960312cc585b8c26b53668ecf37a2a 100644 (file)
@@ -112,6 +112,12 @@ if ($user_type != 'group'){
 <tr>
 <td align=right colspan=$colspan bgcolor="#d0ddb0">
 User Password (changes only)
+<?php
+if ($user_password_exists == 'yes')
+       echo "<font size=-2>User password <font color=\"green\"><b>exists</b></font></font>\n";
+else
+       echo "<font size=-2>User password <font color=\"red\"><b>does not exist</b></font></font>\n";
+?>
 </td>
 <td>
 <input type=password name=passwd value="" size=40>
index 3a918264a4041410bf2b37349276346910b32dbc..e37e2cd0bb06579bc82d7781fdcb32dfa2af07b5 100644 (file)
@@ -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'){
index 56e069c88c11498df631e2510957dabf44d9fcac..497458111c1d044bc6284a4fb54b3c0498714fd8 100644 (file)
@@ -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"];
                }
index e8bfdec388a15469196e93ceb0205d01d174be0a..0bea6924945a09a29270170f757ae1d1124b1979 100644 (file)
@@ -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";