Le mie ricerche mi hanno portato a questo codice:
public function authenticate() {
$ldaprdn = "******\\" . $this->username;
$ldappass = $this->password;
$ldapconn = ldap_connect("********")
or die("Could not connect to LDAP server.");
if ($ldapconn) {
$ldapbind = ldap_bind($ldapconn, $ldaprdn, $ldappass);
if ($ldapbind) {
$this->errorCode = self::ERROR_NONE;
} else {
$this->errorCode == self::ERROR_UNKNOWN_IDENTITY;
}
}
return $this->errorCode == self::ERROR_NONE;
}Spero di aver reso qualcuno felice per questo codice =).

Help
















