Hello,
I am looking to use LDAP to authenticate against a Lotus NAB. I have no problem doing this using the user's full first name and last name, however, I want to be able to do it using the user's ShortName, which I can't successfully do. Can someone tell me if this is even possible? I'm using PHP by the way...
Here's my code for reference:
$dn="CN=" . $username . ", OU=OrganizationalUnit, O=Organization";
$ldaphost="ldaphost.com";
$ldapport=nnn;
$ip = "ldaphost.com:nnn";
if (!($ldap = ldap_connect($ldaphost,$ldapport))) {
die ("Could not connect to LDAP server");
}
if (!($res = @ldap_bind($ldap, $dn, $password))) {
die ("<div align=\"center\"><h3>Invalid username or password: Please try again</h3><a href=\"login.php\">Go back to login page</a></div>");
}
Any advice is helpful, thank you!
Cheers!
Laura
I am looking to use LDAP to authenticate against a Lotus NAB. I have no problem doing this using the user's full first name and last name, however, I want to be able to do it using the user's ShortName, which I can't successfully do. Can someone tell me if this is even possible? I'm using PHP by the way...
Here's my code for reference:
$dn="CN=" . $username . ", OU=OrganizationalUnit, O=Organization";
$ldaphost="ldaphost.com";
$ldapport=nnn;
$ip = "ldaphost.com:nnn";
if (!($ldap = ldap_connect($ldaphost,$ldapport))) {
die ("Could not connect to LDAP server");
}
if (!($res = @ldap_bind($ldap, $dn, $password))) {
die ("<div align=\"center\"><h3>Invalid username or password: Please try again</h3><a href=\"login.php\">Go back to login page</a></div>");
}
Any advice is helpful, thank you!
Cheers!
Laura