I want only a group (of teachers) to have access to a specific webpage on my website.
This page is for teachers only.
Inside the active directory we have a group called the “faculty”
Here is a snippet of code that I have to run to authenticate users through the ldap / active directory, but I only want to identify users in the teacher group.
$ldap = ldap_connect("ldap.domain.com")
if($bind = ldap_bind($ldap, $_POST['username'], $_POST['password'])) {
// log them in!
} else {
// error message
}
source
share