From 9ba559aa8a422135c7cc8ef9e4e59461096624e2 Mon Sep 17 00:00:00 2001 From: michael Date: Thu, 6 Feb 2003 11:11:25 +0000 Subject: [PATCH] fixed syntax errors. --- lib/authentication/LDAPAuthenticator.inc | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/lib/authentication/LDAPAuthenticator.inc b/lib/authentication/LDAPAuthenticator.inc index 0515a68..14001f4 100644 --- a/lib/authentication/LDAPAuthenticator.inc +++ b/lib/authentication/LDAPAuthenticator.inc @@ -59,18 +59,17 @@ class LDAPAuthenticator extends Authenticator { if ($this->oLdap->connect()) { // lookup dn from username - must exist in db $sBindDn = lookupField($default->owl_users_table, "ldap_dn", "username", $sUserName); - if (!$sBindDn) { + if ($sBindDn) { if ( $this->oLdap->authBind($sBindDn, $sPassword) ) { return true; } else { $_SESSION["errorMessage"] = "LDAP error: (" . $this->oLdap->ldapErrorCode . ") " . $this->oLdap->ldapErrorText; return false; } - } else { // no ldap_dn for this user, so reject this authentication attempt - $_SESSION["errorMessage"] = "Username $sUserName does not not exist in the DMS. Please contact the System Administrator for assistance." - return false; + $_SESSION["errorMessage"] = "Username $sUserName does not not exist in the DMS. Please contact the System Administrator for assistance."; + return false; } } else { $_SESSION["errorMessage"] = "LDAP error: (" . $this->oLdap->ldapErrorCode . ") " . $this->oLdap->ldapErrorText; -- libgit2 0.21.4