Commit 9ba559aa8a422135c7cc8ef9e4e59461096624e2

Authored by michael
1 parent f8c44cf2

fixed syntax errors.


git-svn-id: https://kt-dms.svn.sourceforge.net/svnroot/kt-dms/trunk@848 c91229c3-7414-0410-bfa2-8a42b809f60b
lib/authentication/LDAPAuthenticator.inc
... ... @@ -59,18 +59,17 @@ class LDAPAuthenticator extends Authenticator {
59 59 if ($this->oLdap->connect()) {
60 60 // lookup dn from username - must exist in db
61 61 $sBindDn = lookupField($default->owl_users_table, "ldap_dn", "username", $sUserName);
62   - if (!$sBindDn) {
  62 + if ($sBindDn) {
63 63 if ( $this->oLdap->authBind($sBindDn, $sPassword) ) {
64 64 return true;
65 65 } else {
66 66 $_SESSION["errorMessage"] = "LDAP error: (" . $this->oLdap->ldapErrorCode . ") " . $this->oLdap->ldapErrorText;
67 67 return false;
68 68 }
69   -
70 69 } else {
71 70 // no ldap_dn for this user, so reject this authentication attempt
72   - $_SESSION["errorMessage"] = "Username $sUserName does not not exist in the DMS. Please contact the System Administrator for assistance."
73   - return false;
  71 + $_SESSION["errorMessage"] = "Username $sUserName does not not exist in the DMS. Please contact the System Administrator for assistance.";
  72 + return false;
74 73 }
75 74 } else {
76 75 $_SESSION["errorMessage"] = "LDAP error: (" . $this->oLdap->ldapErrorCode . ") " . $this->oLdap->ldapErrorText;
... ...