$csvImport->IgnoreDuplicate($ignoreDuplicate == "Y"); $csvImport->SetCallback("_OnUserAdd"); $csvImport->SetImageFilePath($pathToImages); $csvImport->AttachUsersToIBlock($attachIBlockID); $defaultUserEmail = $csvImport->GetDefaultEmail(); if ($ldapServer > 0 && $ldapExists) { $dbLdap = CLdapServer::GetByID($ldapServer); if ($dbLdap->Fetch()) $csvImport->externalAuthID = "LDAP#".$ldapServer; } if ($csvImport->IsErrorOccured()) $strError = $csvImport->GetErrorMessage(); } else $strError = GetMessage("USER_IMPORT_CSV_NOT_FOUND"); } elseif ($dataSource == "ldap") { $dbLdap = CLdapServer::GetByID($ldapServer); if ($arLdap = $dbLdap->Fetch()) { // this is a test connection, thus any parameters other than related to establishing a connection, have no effect here $ldp = CLDAP::Connect( array( "SERVER" => $arLdap['SERVER'], "PORT" => $arLdap['PORT'], "ADMIN_LOGIN" => $arLdap['ADMIN_LOGIN'],