Commit 8a91fe0a259126186d538b36a85496b0f60cb747

Authored by kevin_fourie
1 parent 5271a343

KTS-1848

"Cannot use object of type Net_LDAP_Error as array"
Original issue was TLS related but changed some inconsistent use of local and member variables that could be causing other problems.

Committed By: Kevin
Reviewed By: Conrad

git-svn-id: https://kt-dms.svn.sourceforge.net/svnroot/kt-dms/STABLE/trunk@6684 c91229c3-7414-0410-bfa2-8a42b809f60b
plugins/ktstandard/ldap/ldapbaseauthenticationprovider.inc.php
@@ -618,7 +618,7 @@ class KTLDAPBaseAuthenticator extends Authenticator { @@ -618,7 +618,7 @@ class KTLDAPBaseAuthenticator extends Authenticator {
618 618
619 $this->oLdap =& Net_LDAP::connect($config); 619 $this->oLdap =& Net_LDAP::connect($config);
620 if (PEAR::isError($this->oLdap)) { 620 if (PEAR::isError($this->oLdap)) {
621 - return $oLdap; 621 + return $this->oLdap;
622 } 622 }
623 } 623 }
624 624
@@ -637,11 +637,11 @@ class KTLDAPBaseAuthenticator extends Authenticator { @@ -637,11 +637,11 @@ class KTLDAPBaseAuthenticator extends Authenticator {
637 'tls' => $this->bTls, 637 'tls' => $this->bTls,
638 'port'=> $this->iLdapPort 638 'port'=> $this->iLdapPort
639 ); 639 );
640 - $oLdap =& Net_LDAP::connect($config);  
641 - if (PEAR::isError($oLdap)) {  
642 - return $oLdap; 640 + $this->oLdap =& Net_LDAP::connect($config);
  641 + if (PEAR::isError($this->oLdap)) {
  642 + return $this->oLdap;
643 } 643 }
644 - $res = $oLdap->reBind($dn, $sPassword); 644 + $res = $this->oLdap->reBind($dn, $sPassword);
645 return $res; 645 return $res;
646 } 646 }
647 647
@@ -665,11 +665,11 @@ class KTLDAPBaseAuthenticator extends Authenticator { @@ -665,11 +665,11 @@ class KTLDAPBaseAuthenticator extends Authenticator {
665 'tls' => $this->bTls, 665 'tls' => $this->bTls,
666 'port'=> $this->iLdapPort 666 'port'=> $this->iLdapPort
667 ); 667 );
668 - $oLdap =& Net_LDAP::connect($config);  
669 - if (PEAR::isError($oLdap)) {  
670 - return $oLdap; 668 + $this->oLdap =& Net_LDAP::connect($config);
  669 + if (PEAR::isError($this->oLdap)) {
  670 + return $this->oLdap;
671 } 671 }
672 - $res = $oLdap->reBind($dn, $sPassword); 672 + $res = $this->oLdap->reBind($dn, $sPassword);
673 if ($res === true) { 673 if ($res === true) {
674 return $dn; 674 return $dn;
675 } 675 }