refactor: [WIP] Migrate config ldap controller.

Signed-off-by: Rubén D <nuxsmin@syspass.org>
This commit is contained in:
Rubén D
2022-06-11 20:09:54 +02:00
parent 5aa66b7045
commit 76db8ed677

View File

@@ -55,18 +55,14 @@ final class SaveController extends SimpleControllerBase
$eventMessage = EventMessage::factory();
$configData = $this->config->getConfigData();
// LDAP
$ldapEnabled = $this->request->analyzeBool('ldap_enabled', false);
$ldapDefaultGroup = $this->request->analyzeInt('ldap_defaultgroup');
$ldapDefaultProfile = $this->request->analyzeInt('ldap_defaultprofile');
$ldapParams = $this->getLdapParamsFromRequest($this->request);
// Valores para la configuración de LDAP
if ($ldapEnabled
&& !($ldapParams->getServer()
|| $ldapParams->getSearchBase()
|| $ldapParams->getBindDn())) {
&& !($ldapParams->getServer() || $ldapParams->getSearchBase() || $ldapParams->getBindDn())) {
throw new ValidationException(SPException::ERROR, __u('Missing LDAP parameters'));
}