feat: use a service account to permit read only checks like for auth
This commit is contained in:
@@ -30,7 +30,7 @@ if ($_SERVER['REQUEST_METHOD'] === 'POST') {
|
||||
ldap_set_option($ldapconn, LDAP_OPT_PROTOCOL_VERSION, 3);
|
||||
ldap_set_option($ldapconn, LDAP_OPT_REFERRALS, 0);
|
||||
|
||||
$ldap_user = "CN=" . $_SESSION['user_pseudo'] . ",CN=Users,DC=epul3a,DC=local";
|
||||
$ldap_user = "CN=" . $_SESSION['sAMAccountName'] . ",CN=Users,DC=epul3a,DC=local";
|
||||
|
||||
if (!@ldap_bind($ldapconn, $ldap_user, $_SESSION['password'])) {
|
||||
die("Could not bind to LDAP server: " . ldap_error($ldapconn));
|
||||
|
||||
Reference in New Issue
Block a user