getName() !== $_SESSION['conf_isAuthenticated'])) { $_SESSION['conf_message'] = new htmlStatusMessage('ERROR', _("No password was entered!")); /** go back to login if password is empty */ require(__DIR__ . '/conflogin.php'); exit; } $conf = &$_SESSION['conf_config']; $confName = $_SESSION['conf_isAuthenticated']; echo $_SESSION['header']; printHeaderContents(_("LDAP Account Manager Configuration"), '../..'); echo "\n"; // include all JavaScript files printJsIncludes('../..'); printConfigurationPageHeaderBar($conf); $serverProfilePersistenceManager = new ServerProfilePersistenceManager(); try { $serverProfilePersistenceManager->saveProfile($conf, $confName); $scriptTag = new htmlJavaScript('window.lam.dialog.showSuccessMessageAndRedirect("' . _("Your settings were successfully saved.") . '", "' . htmlspecialchars($confName) . '", "' . _('Ok') . '", "../login.php")'); parseHtml(null, $scriptTag, [], false, null); } catch (LAMException $e) { $scriptTag = new htmlJavaScript('window.lam.dialog.showErrorMessageAndRedirect("' . htmlspecialchars($e->getTitle()) . '", "' . htmlspecialchars($e->getMessage()) . '", "' . _('Ok') . '", "../login.php")'); parseHtml(null, $scriptTag, [], false, null); } finally { // remove settings from the session $sessionKeys = array_keys($_SESSION); foreach ($sessionKeys as $sessionKey) { if (str_starts_with($sessionKey, "conf_")) { unset($_SESSION[$sessionKey]); } } } ?>