mirror of
https://github.com/nuxsmin/sysPass.git
synced 2026-03-10 18:37:00 +01:00
refactor: [WIP] Migrate config ldap controller.
Signed-off-by: Rubén D <nuxsmin@syspass.org>
This commit is contained in:
@@ -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'));
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user