1, 0 => $username.'@'.$_SERVER[HTTP_HOST]); $fullname = $username; if ($data['count']==1) { if (isset($data[0]['mail'])) $email = $data[0]['mail']; if (isset($data[0]['cn'][0])) $fullname = $data[0]['cn'][0]; } } else { error_log("user login failed: ".$checkuser.'='.$tstusername.','.$ldapbase); error_log(ldap_error($ldapconn)); ldap_close($ldapconn); basicAuth(); } } ?>