]> git.entuzijast.net Git - freeradius-dialup-admin.git/commitdiff
Allow for multiple regular profile attributes in a user entry.
authorkkalev <kkalev>
Wed, 2 Oct 2002 09:15:11 +0000 (09:15 +0000)
committerkkalev <kkalev>
Wed, 2 Oct 2002 09:15:11 +0000 (09:15 +0000)
Changelog
lib/ldap/defaults.php3

index aaeb8822beae5e1adc648fa91d27bd75d505b68e..a6c79012dd0f50119c92d332c29ceedf272eaa15 100644 (file)
--- a/Changelog
+++ b/Changelog
@@ -21,6 +21,7 @@ Ver 1.60:
   user_finger somewhat faster.
 * Fix a small issue with the general_accounting_info_order
 * Fix a problem in failed_logins when NASIPAddress is not set.
+* Allow for multiple regular profile attributes in a user entry.
 Ver 1.59:
 * Small html fixes in user_edit.php3 and password.php3
 * Show number of failed logins in the last 7 days in the user admin page
index 4169d8a43a050f2b536d58e1e82f2981e5434dd8..c1196eb8c8160026401f0eedf0d4f4cd260c219d 100644 (file)
@@ -27,23 +27,25 @@ if ($config[ldap_default_dn] != ''){
                        $get_attrs = array("$regular_profile_attr");
                        $sr=@ldap_search($ds,"$config[ldap_base]","uid=" . $login,$get_attrs);
                        if ($info = @ldap_get_entries($ds,$sr)){
-                               $dn2 = $info[0][$regular_profile_attr][0];
-                               if ($dn2 != ''){
-                                       $sr2=@ldap_search($ds,"$dn2",'objectclass=*');
-                                       if ($info2 = @ldap_get_entries($ds,$sr2)){
-                                               $dn3 = $info2[0]['dn'];
-                                               if ($dn3 != ''){
-                                                       foreach($attrmap as $key => $val){
-                                                               if ($info2[0]["$val"][0] != '' && $key != 'Dialup-Access'){
-                                                                       if (!isset($default_vals["$key"]))
-                                                                               $default_vals["$key"] = array();
-                                                                       if ($attrmap[generic]["$key"] == 'generic'){
-                                                                               for($i=0;$i<$info2[0]["$val"][count];$i++)
-                                                                                       $default_vals["$key"][] = $info2[0]["$val"][$i];
-                                                                               $default_vals["$key"][count] += $info2[0]["$val"][count];
+                               for($i=0;$i<$info[0][$regular_profile_attr]["count"];$i++){
+                                       $dn2 = $info[0][$regular_profile_attr][$i];
+                                       if ($dn2 != ''){
+                                               $sr2=@ldap_search($ds,"$dn2",'objectclass=*');
+                                               if ($info2 = @ldap_get_entries($ds,$sr2)){
+                                                       $dn3 = $info2[0]['dn'];
+                                                       if ($dn3 != ''){
+                                                               foreach($attrmap as $key => $val){
+                                                                       if ($info2[0]["$val"][0] != '' && $key != 'Dialup-Access'){
+                                                                               if (!isset($default_vals["$key"]))
+                                                                                       $default_vals["$key"] = array();
+                                                                               if ($attrmap[generic]["$key"] == 'generic'){
+                                                                                       for($i=0;$i<$info2[0]["$val"][count];$i++)
+                                                                                               $default_vals["$key"][] = $info2[0]["$val"][$i];
+                                                                                       $default_vals["$key"][count] += $info2[0]["$val"][count];
+                                                                               }
+                                                                               else
+                                                                                       $default_vals["$key"] = $info2[0]["$val"];
                                                                        }
-                                                                       else
-                                                                               $default_vals["$key"] = $info2[0]["$val"];
                                                                }
                                                        }
                                                }