Merged in bugfix/PMCORE-2597 (pull request #7692)

PMCORE-2597 Importing a configuration when the TLS certificate is not set- does not appears a message about it

Approved-by: Julio Cesar Laura Avendaño <contact@julio-laura.com>
This commit is contained in:
Roly Rudy Gutierrez Pinto
2021-01-04 16:13:35 +00:00
committed by Julio Cesar Laura Avendaño
5 changed files with 23 additions and 3 deletions

View File

@@ -395,10 +395,14 @@ switch ($function) {
//Test connection
$ldapAdvanced = new LdapAdvanced();
$ldapcnn = $ldapAdvanced->ldapConnection($arrayAuthenticationSourceData);
$resultLDAPStartTLS = true;
$ldapcnn = $ldapAdvanced->ldapConnection($arrayAuthenticationSourceData, $resultLDAPStartTLS);
//Response
$response["status"] = "OK";
if ($resultLDAPStartTLS === false) {
$response["message"] = G::LoadTranslation("ID_TLS_CERTIFICATE_IS_NOT_INSTALLED_IN_THE_SERVER");
}
} catch (Exception $e) {
//Response
$response["status"] = "ERROR";