|
|
@ -23,6 +23,9 @@ if (!isset($_SERVER['PHP_AUTH_USER'])) { |
|
|
|
ldap_start_tls($ldapconn) |
|
|
|
ldap_start_tls($ldapconn) |
|
|
|
or error_die($ldapconn, "cannot start LDAP TLS"); |
|
|
|
or error_die($ldapconn, "cannot start LDAP TLS"); |
|
|
|
if ($ldapbind = @ldap_bind($ldapconn, $checkuser.'='.$tstusername.','.$ldapbase, $password)) { |
|
|
|
if ($ldapbind = @ldap_bind($ldapconn, $checkuser.'='.$tstusername.','.$ldapbase, $password)) { |
|
|
|
|
|
|
|
ldap_bind($ldap, 'username', 'password'); |
|
|
|
|
|
|
|
$search = ldap_search($ldapconn, 'base_dn', 'search_filter', array('mail', 'cn')); |
|
|
|
|
|
|
|
$data = ldap_get_entries($ldap, $search); |
|
|
|
ldap_close($ldapconn); |
|
|
|
ldap_close($ldapconn); |
|
|
|
$username = $tstusername; |
|
|
|
$username = $tstusername; |
|
|
|
} else { |
|
|
|
} else { |
|
|
|