We have a previous install that is using LDAP authentication, but I can find no documentation on how to implement that with a fresh code base? Any help?
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
you need to create a file in includes/lib/auth called ldap.inc.php and in it put the following function - but you will need to modify the internals of this function to match your ldap server authentication requirements. Then if you log in to interact and go to server admin under settings you should see ldap as an authentication option.
function auth_ldap($user_name, $password, $password2, $level_key) {
We have a previous install that is using LDAP authentication, but I can find no documentation on how to implement that with a fresh code base? Any help?
you need to create a file in includes/lib/auth called ldap.inc.php and in it put the following function - but you will need to modify the internals of this function to match your ldap server authentication requirements. Then if you log in to interact and go to server admin under settings you should see ldap as an authentication option.
function auth_ldap($user_name, $password, $password2, $level_key) {
global $CONFIG;
if ($conn = @ldap_connect('localhost')) {
$binddn = "uid=$user_name,ou=Users,dc=smart-net,dc=local";
if (!$rs = @ldap_bind($conn, $binddn, $password)) {
return false;
} else {
return true;
}
} else {
return false;
}
}