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
$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"];
}
}
}