if(empty($dn)){
//anonymous bind to lookup users
//blank binddn or blank bindpw will result in anonymous bind
- if(!ldap_bind($LDAP_CON,$conf['anonbinddn'],$conf['anonbindpw'])){
+ if(!@ldap_bind($LDAP_CON,$conf['anonbinddn'],$conf['anonbindpw'])){
die("can not bind for user lookup");
}
}
//bind with dn
- if(ldap_bind($LDAP_CON,$dn,$pass)){
+ if(@ldap_bind($LDAP_CON,$dn,$pass)){
//bind successful -> set up session
set_session($user,$pass,$dn);
return true;
$out[$FIELDS["_$key"]][] = $value; //shouldn't happen, but to be sure
}
}else{
- // no mapping found - assume it to be a LDAP attribute (shouldn't happen)
- if(is_array($value)){
- $out[$key] = $value;
- }else{
- $out[$key][] = $value;
- }
+ // no mapping found we ignore it
}
}