\n";
@@ -516,10 +516,13 @@ function checkInput() {
$conf->setLoginMethod($_POST['loginMethod']);
$conf->setLoginSearchFilter($_POST['loginSearchFilter']);
$conf->setLoginSearchSuffix($_POST['loginSearchSuffix']);
- if (!$conf->setLoginSearchDN($_POST['loginSearchDN'])) {
- $errors[] = array("ERROR", _("Please enter a valid bind user."));
- }
$conf->setLoginSearchPassword($_POST['loginSearchPassword']);
+ $conf->setLoginSearchDN($_POST['loginSearchDN']);
+ if ($_POST['loginMethod'] == LAMConfig::LOGIN_SEARCH) { // check only if search method
+ if (!$conf->setLoginSearchDN($_POST['loginSearchDN'])) {
+ $errors[] = array("ERROR", _("Please enter a valid bind user."));
+ }
+ }
if (isset($_POST['httpAuthentication']) && ($_POST['httpAuthentication'] == 'on')) {
$conf->setHttpAuthentication('true');
}
diff --git a/lam/templates/config/moduleSettings.php b/lam/templates/config/moduleSettings.php
index caaebdb9..47fbc7eb 100644
--- a/lam/templates/config/moduleSettings.php
+++ b/lam/templates/config/moduleSettings.php
@@ -144,7 +144,7 @@ foreach ($jsFiles as $jsEntry) {
// print error messages
for ($i = 0; $i < sizeof($errorsToDisplay); $i++) call_user_func_array('StatusMessage', $errorsToDisplay[$i]);
-echo ("