Commit 39af5c089da8a158651624de4f47a426e26498d7

Authored by Kevin Fourie
1 parent 3dba74e0

KTS-1941

"If a user is not created in KT and an authentification source is provided when he tries to connect he has an php error message"
Added better error checking.

Committed By: Kevin
Reviewed By: Jalaloedien

git-svn-id: https://kt-dms.svn.sourceforge.net/svnroot/kt-dms/trunk@6637 c91229c3-7414-0410-bfa2-8a42b809f60b
plugins/ktstandard/ldap/ldapbaseauthenticationprovider.inc.php
@@ -541,6 +541,8 @@ class KTLDAPBaseAuthenticationProvider extends KTAuthenticationProvider { @@ -541,6 +541,8 @@ class KTLDAPBaseAuthenticationProvider extends KTAuthenticationProvider {
541 function _createSignupGroups($dn, $oSource) { 541 function _createSignupGroups($dn, $oSource) {
542 $oAuthenticator =& $this->getAuthenticator($oSource); 542 $oAuthenticator =& $this->getAuthenticator($oSource);
543 $aGroupDNs = $oAuthenticator->getGroups($dn); 543 $aGroupDNs = $oAuthenticator->getGroups($dn);
  544 + if(PEAR::isError($aGroupDNs) || empty($aGroupDNs)) return;
  545 +
544 foreach ($aGroupDNs as $sGroupDN) { 546 foreach ($aGroupDNs as $sGroupDN) {
545 $oGroup = Group::getByAuthenticationSourceAndDetails($oSource, $sGroupDN); 547 $oGroup = Group::getByAuthenticationSourceAndDetails($oSource, $sGroupDN);
546 if (PEAR::isError($oGroup)) { 548 if (PEAR::isError($oGroup)) {