diff options
author | pb1dft <pb1dft@ampache> | 2006-10-15 01:07:46 +0000 |
---|---|---|
committer | pb1dft <pb1dft@ampache> | 2006-10-15 01:07:46 +0000 |
commit | 8a644eb74fea37111e6950d5883144100bf4a99c (patch) | |
tree | f2c149a06897bfe2fe7061d7aec6336ec0f507ec /modules | |
parent | 0ac27764e1d5e3499a3ca2ded0018d33c42ae50b (diff) | |
download | ampache-8a644eb74fea37111e6950d5883144100bf4a99c.tar.gz ampache-8a644eb74fea37111e6950d5883144100bf4a99c.tar.bz2 ampache-8a644eb74fea37111e6950d5883144100bf4a99c.zip |
Modified the LDAP authentication to support Microsoft AD and fixed some minor typos
Diffstat (limited to 'modules')
-rw-r--r-- | modules/vauth/auth.lib.php | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/modules/vauth/auth.lib.php b/modules/vauth/auth.lib.php index ff0ca5e8..e383d0b5 100644 --- a/modules/vauth/auth.lib.php +++ b/modules/vauth/auth.lib.php @@ -120,7 +120,10 @@ function vauth_ldap_auth($username, $password) { // This is the server url (required) $ldap_url = vauth_conf('ldap_url'); - $ldap_name_field = vauth_conf('ldap_name_field'); + // This is the ldap filter string (required) + $ldap_filter = vauth_conf('ldap_filter'); + + $ldap_name_field = vauth_conf('ldap_name_field'); $ldap_email_field = vauth_conf('ldap_email_field'); if ($ldap_link = ldap_connect($ldap_url) ) { @@ -135,7 +138,7 @@ function vauth_ldap_auth($username, $password) { return $results; } // If bind fails - $sr = ldap_search($ldap_link, $ldap_search_dn, "(uid=$username)"); + $sr = ldap_search($ldap_link, $ldap_dn, "($ldap_filter=$username)"); $info = ldap_get_entries($ldap_link, $sr); if ($info["count"] == 1) { |