added LAM Pro mail settings

This commit is contained in:
Roland Gruber 2010-08-29 16:02:51 +00:00
parent 3f5d113f3c
commit 2ead13206a
4 changed files with 147 additions and 42 deletions

View File

@ -68,3 +68,9 @@ types: suffix_smbDomain: dc=my-domain,dc=com
types: attr_smbDomain: sambaDomainName:Domain name;sambaSID:Domain SID types: attr_smbDomain: sambaDomainName:Domain name;sambaSID:Domain SID
types: modules_smbDomain: sambaDomain types: modules_smbDomain: sambaDomain
# Password mail subject
lamProMailSubject: Your password was reset
# Password mail text
lamProMailText: Dear @@givenName@@ @@sn@@,+::++::+your password was reset to: @@newPassword@@+::++::++::+Best regards+::++::+deskside support+::+

View File

@ -45,10 +45,7 @@ for ($i = 0; $i < sizeof($types); $i++) {
} }
$helpArray = array ( $helpArray = array (
// 0 - 99
// any developer
// 200 - 299 // 200 - 299
// Roland Gruber
// configuration wizard // configuration wizard
// configuration login // configuration login
// config profile management // config profile management
@ -147,7 +144,6 @@ $helpArray = array (
"250" => array ("Headline" => _("Filter"), "250" => array ("Headline" => _("Filter"),
"Text" => _("Here you can input simple filter expressions (e.g. 'value' or 'v*'). The filter is case-sensitive.")), "Text" => _("Here you can input simple filter expressions (e.g. 'value' or 'v*'). The filter is case-sensitive.")),
// 300 - 399 // 300 - 399
// Roland Gruber
// profile editor, file upload // profile editor, file upload
"301" => array ("Headline" => _("RDN identifier"), "301" => array ("Headline" => _("RDN identifier"),
"Text" => _("This is the identifier for the relative DN value. It must be one of the given allowed LDAP attributes (e.g. user accounts usually use \"uid\" while groups use \"cn\").")), "Text" => _("This is the identifier for the relative DN value. It must be one of the given allowed LDAP attributes (e.g. user accounts usually use \"uid\" while groups use \"cn\").")),
@ -164,7 +160,6 @@ $helpArray = array (
"404" => array ("Headline" => _("Password"), "404" => array ("Headline" => _("Password"),
"Text" => _("Please enter the password which you want to set for this account. You may also generate a random password (12 characters) which will be displayed on your screen.")), "Text" => _("Please enter the password which you want to set for this account. You may also generate a random password (12 characters) which will be displayed on your screen.")),
// 500 - 599 // 500 - 599
// Roland Gruber
// LAM Pro // LAM Pro
"501" => array ("Headline" => _("LDAP suffix"), "501" => array ("Headline" => _("LDAP suffix"),
"Text" => _("LAM will search for accounts in this part of the LDAP tree.")), "Text" => _("LAM will search for accounts in this part of the LDAP tree.")),
@ -194,8 +189,16 @@ $helpArray = array (
'<li>' . _('All following lines form the mail body.') . '</li>' . '<li>' . _('All following lines form the mail body.') . '</li>' .
'<li>' . _('You can use wildcards for LDAP attributes in the form @@attribute@@ (e.g. @@uid@@ for the user name).') . '</li>' . '<li>' . _('You can use wildcards for LDAP attributes in the form @@attribute@@ (e.g. @@uid@@ for the user name).') . '</li>' .
'<li>' . _('The wildcard for the new password is @@newPassword@@.') . '</li>'), '<li>' . _('The wildcard for the new password is @@newPassword@@.') . '</li>'),
"550" => array ("Headline" => _("From address"),
"Text" => _("This email address will be set as sender address of all password mails. If empty the system default (php.ini) will be used.")),
"551" => array ("Headline" => _("Subject"),
"Text" => _('The subject of all password mails. If empty the first line of "config/passwordMailTemplate.txt" will be used.')),
"552" => array ("Headline" => _("Text"),
"Text" => _('The mail text of all password mails. If empty the content of "config/passwordMailTemplate.txt" starting at the second line will be used.') .
'<br><br><b>' . _('Format') . ': </b><ul>' .
'<li>' . _('You can use wildcards for LDAP attributes in the form @@attribute@@ (e.g. @@uid@@ for the user name).') . '</li>' .
'<li>' . _('The wildcard for the new password is @@newPassword@@.') . '</li>'),
// 600 - 699 // 600 - 699
// Roland Gruber
// OU-editor, domain page // OU-editor, domain page
"601" => array ("Headline" => _("OU-Editor") . " - " . _("New organizational unit"), "601" => array ("Headline" => _("OU-Editor") . " - " . _("New organizational unit"),
"Text" => _("This will create a new organizational unit under the selected one.")), "Text" => _("This will create a new organizational unit under the selected one.")),

View File

@ -175,6 +175,9 @@ class LAMConfig {
/* login method: predefined list or LDAP search */ /* login method: predefined list or LDAP search */
const LOGIN_LIST = 'list'; const LOGIN_LIST = 'list';
const LOGIN_SEARCH = 'search'; const LOGIN_SEARCH = 'search';
/** line separator */
const LINE_SEPARATOR = '+::+';
/** Server address (e.g. ldap://127.0.0.1:389) */ /** Server address (e.g. ldap://127.0.0.1:389) */
private $ServerURL; private $ServerURL;
@ -244,12 +247,21 @@ class LAMConfig {
/** search filter for login */ /** search filter for login */
private $loginSearchFilter = 'uid=%USER%'; private $loginSearchFilter = 'uid=%USER%';
/** email address for sender of password reset mails */
private $lamProMailFrom = '';
/** subject for password reset mails */
private $lamProMailSubject = '';
/** mail body for password reset mails */
private $lamProMailText = '';
/** List of all settings in config file */ /** List of all settings in config file */
private $settings = array("ServerURL", "useTLS", "Passwd", "Admins", "treesuffix", private $settings = array("ServerURL", "useTLS", "Passwd", "Admins", "treesuffix",
"defaultLanguage", "scriptPath", "scriptServer", "scriptRights", "cachetimeout", "defaultLanguage", "scriptPath", "scriptServer", "scriptRights", "cachetimeout",
"modules", "activeTypes", "types", "accessLevel", 'loginMethod', 'loginSearchSuffix', "modules", "activeTypes", "types", "accessLevel", 'loginMethod', 'loginSearchSuffix',
'loginSearchFilter', 'searchLimit'); 'loginSearchFilter', 'searchLimit', 'lamProMailFrom', 'lamProMailSubject', 'lamProMailText');
/** /**
@ -290,7 +302,7 @@ class LAMConfig {
if (strtolower(substr($line, 0, $keylen + 2)) == "modules: ") { if (strtolower(substr($line, 0, $keylen + 2)) == "modules: ") {
$option = substr($line, $keylen + 2, strlen($line) - $keylen - 2); $option = substr($line, $keylen + 2, strlen($line) - $keylen - 2);
$pos = strpos($option, ":"); $pos = strpos($option, ":");
$this->moduleSettings[substr($option, 0, $pos)] = explode("+::+", substr($option, $pos + 2)); $this->moduleSettings[substr($option, 0, $pos)] = explode(LAMConfig::LINE_SEPARATOR, substr($option, $pos + 2));
} }
// type settings // type settings
elseif (strtolower(substr($line, 0, $keylen + 2)) == "types: ") { elseif (strtolower(substr($line, 0, $keylen + 2)) == "types: ") {
@ -357,7 +369,7 @@ class LAMConfig {
$pos = strpos($option, ":"); $pos = strpos($option, ":");
$name = substr($option, 0, $pos); $name = substr($option, 0, $pos);
if (!isset($this->moduleSettings[$name])) continue; if (!isset($this->moduleSettings[$name])) continue;
$file_array[$i] = "modules: " . $name . ": " . implode("+::+", $this->moduleSettings[$name]) . "\n"; $file_array[$i] = "modules: " . $name . ": " . implode(LAMConfig::LINE_SEPARATOR, $this->moduleSettings[$name]) . "\n";
$mod_saved[] = $name; // mark keyword as saved $mod_saved[] = $name; // mark keyword as saved
} }
// type settings // type settings
@ -398,11 +410,14 @@ class LAMConfig {
if (!in_array("loginMethod", $saved)) array_push($file_array, "\n\n# Login method.\n" . "loginMethod: " . $this->loginMethod . "\n"); if (!in_array("loginMethod", $saved)) array_push($file_array, "\n\n# Login method.\n" . "loginMethod: " . $this->loginMethod . "\n");
if (!in_array("loginSearchSuffix", $saved)) array_push($file_array, "\n\n# Search suffix for LAM login.\n" . "loginSearchSuffix: " . $this->loginSearchSuffix . "\n"); if (!in_array("loginSearchSuffix", $saved)) array_push($file_array, "\n\n# Search suffix for LAM login.\n" . "loginSearchSuffix: " . $this->loginSearchSuffix . "\n");
if (!in_array("loginSearchFilter", $saved)) array_push($file_array, "\n\n# Search filter for LAM login.\n" . "loginSearchFilter: " . $this->loginSearchFilter . "\n"); if (!in_array("loginSearchFilter", $saved)) array_push($file_array, "\n\n# Search filter for LAM login.\n" . "loginSearchFilter: " . $this->loginSearchFilter . "\n");
if (!in_array("lamProMailFrom", $saved)) array_push($file_array, "\n\n# Password mail from\n" . "lamProMailFrom: " . $this->lamProMailFrom . "\n");
if (!in_array("lamProMailSubject", $saved)) array_push($file_array, "\n\n# Password mail subject\n" . "lamProMailSubject: " . $this->lamProMailSubject . "\n");
if (!in_array("lamProMailText", $saved)) array_push($file_array, "\n\n# Password mail text\n" . "lamProMailText: " . $this->lamProMailText . "\n");
// check if all module settings were added // check if all module settings were added
$m_settings = array_keys($this->moduleSettings); $m_settings = array_keys($this->moduleSettings);
for ($i = 0; $i < sizeof($m_settings); $i++) { for ($i = 0; $i < sizeof($m_settings); $i++) {
if (!in_array($m_settings[$i], $mod_saved)) { if (!in_array($m_settings[$i], $mod_saved)) {
array_push($file_array, "modules: " . $m_settings[$i] . ": " . implode("+::+", $this->moduleSettings[$m_settings[$i]]) . "\n"); array_push($file_array, "modules: " . $m_settings[$i] . ": " . implode(LAMConfig::LINE_SEPARATOR, $this->moduleSettings[$m_settings[$i]]) . "\n");
} }
} }
// check if all type settings were added // check if all type settings were added
@ -1003,6 +1018,65 @@ class LAMConfig {
public function setLoginSearchSuffix($loginSearchSuffix) { public function setLoginSearchSuffix($loginSearchSuffix) {
$this->loginSearchSuffix = $loginSearchSuffix; $this->loginSearchSuffix = $loginSearchSuffix;
} }
/**
* Returns the sender address for password reset mails.
*
* @return String mail address
*/
public function getLamProMailFrom() {
return $this->lamProMailFrom;
}
/**
* Sets the sender address for password reset mails.
*
* @param String $lamProMailFrom mail address
* @return boolean true if address is valid
*/
public function setLamProMailFrom($lamProMailFrom) {
$this->lamProMailFrom = $lamProMailFrom;
if (($lamProMailFrom != '') && !get_preg($lamProMailFrom, 'email')) {
return false;
}
return true;
}
/**
* Returns the subject for password reset mails.
*
* @return String subject
*/
public function getLamProMailSubject() {
return $this->lamProMailSubject;
}
/**
* Sets the subject for password reset mails.
*
* @param String $lamProMailSubject subject
*/
public function setLamProMailSubject($lamProMailSubject) {
$this->lamProMailSubject = $lamProMailSubject;
}
/**
* Returns the mail body for password reset mails.
*
* @return String body
*/
public function getLamProMailText() {
return implode("\r\n", explode(LAMConfig::LINE_SEPARATOR, $this->lamProMailText));
}
/**
* Sets the mail body for password reset mails.
*
* @param String $lamProMailText body
*/
public function setLamProMailText($lamProMailText) {
$this->lamProMailText = implode(LAMConfig::LINE_SEPARATOR, explode("\r\n", $lamProMailText));
}
} }

View File

@ -230,10 +230,10 @@ jQuery(document).ready(function() {
<div class="ui-tabs-panel ui-widget-content ui-corner-bottom"> <div class="ui-tabs-panel ui-widget-content ui-corner-bottom">
<?php <?php
echo ("<fieldset><legend><img align=\"middle\" src=\"../../graphics/profiles.png\" alt=\"profiles.png\"> <b>" . _("Server settings") . "</b></legend><br>\n"); echo ("<fieldset><legend><img align=\"middle\" src=\"../../graphics/profiles.png\" alt=\"profiles.png\"> " . _("Server settings") . "</legend><br>\n");
echo ("<table border=0>"); echo ("<table border=0>");
// serverURL // serverURL
echo ("<tr><td align=\"right\"><b>" . _("Server address") . " *: </b></td>". echo ("<tr><td align=\"right\">" . _("Server address") . " * </td>".
"<td align=\"left\">". "<td align=\"left\">".
"<input tabindex=\"$tabindex\" size=50 type=\"text\" name=\"serverurl\" value=\"" . $conf->get_ServerURL() . "\">". "<input tabindex=\"$tabindex\" size=50 type=\"text\" name=\"serverurl\" value=\"" . $conf->get_ServerURL() . "\">".
"</td>\n"); "</td>\n");
@ -242,7 +242,7 @@ printHelpLink(getHelp('', '201'), '201');
echo "</td></tr>\n"; echo "</td></tr>\n";
$tabindex++; $tabindex++;
// use TLS // use TLS
echo "<tr><td align=\"right\"><b>" . _("Activate TLS") . ": </b></td>\n"; echo "<tr><td align=\"right\">" . _("Activate TLS") . " </td>\n";
echo "<td align=\"left\">\n"; echo "<td align=\"left\">\n";
echo "<select tabindex=\"$tabindex\" size=1 name=\"useTLS\">"; echo "<select tabindex=\"$tabindex\" size=1 name=\"useTLS\">";
$useTLS = $conf->getUseTLS(); $useTLS = $conf->getUseTLS();
@ -265,8 +265,8 @@ $tabindex++;
echo ("<tr><td colspan=3>&nbsp;</td></tr>"); echo ("<tr><td colspan=3>&nbsp;</td></tr>");
// tree suffix // tree suffix
echo ("<tr><td align=\"right\"><b>". echo ("<tr><td align=\"right\">".
_("Tree suffix") . ": </b></td>". _("Tree suffix") . " </td>".
"<td><input tabindex=\"$tabindex\" size=50 type=\"text\" name=\"sufftree\" value=\"" . $conf->get_Suffix('tree') . "\"></td>\n"); "<td><input tabindex=\"$tabindex\" size=50 type=\"text\" name=\"sufftree\" value=\"" . $conf->get_Suffix('tree') . "\"></td>\n");
echo "<td>"; echo "<td>";
printHelpLink(getHelp('', '203'), '203'); printHelpLink(getHelp('', '203'), '203');
@ -277,8 +277,8 @@ $tabindex++;
echo ("<tr><td colspan=3>&nbsp;</td></tr>"); echo ("<tr><td colspan=3>&nbsp;</td></tr>");
// LDAP cache timeout // LDAP cache timeout
echo ("<tr><td align=\"right\"><b>". echo ("<tr><td align=\"right\">".
_("Cache timeout") . ": </b></td>". _("Cache timeout") . " </td>".
"<td><select tabindex=\"$tabindex\" name=\"cachetimeout\">\n<option selected>".$conf->get_cacheTimeout()."</option>\n"); "<td><select tabindex=\"$tabindex\" name=\"cachetimeout\">\n<option selected>".$conf->get_cacheTimeout()."</option>\n");
if ($conf->get_cacheTimeout() != 0) echo("<option>0</option>\n"); if ($conf->get_cacheTimeout() != 0) echo("<option>0</option>\n");
if ($conf->get_cacheTimeout() != 1) echo("<option>1</option>\n"); if ($conf->get_cacheTimeout() != 1) echo("<option>1</option>\n");
@ -298,8 +298,8 @@ array(0, '-'), array(100, 100), array(500, 500),
array(1000, 1000), array(5000, 5000), array(10000, 10000), array(1000, 1000), array(5000, 5000), array(10000, 10000),
array(50000, 50000), array(100000, 100000) array(50000, 50000), array(100000, 100000)
); );
echo ("<tr><td align=\"right\"><b>". echo ("<tr><td align=\"right\">".
_("LDAP search limit") . ": </b></td>". _("LDAP search limit") . " </td>".
"<td><select tabindex=\"$tabindex\" name=\"searchLimit\">\n"); "<td><select tabindex=\"$tabindex\" name=\"searchLimit\">\n");
for ($i = 0; $i < sizeof($searchLimitOptions); $i++) { for ($i = 0; $i < sizeof($searchLimitOptions); $i++) {
$selected = ""; $selected = "";
@ -320,8 +320,8 @@ if (isLAMProVersion()) {
echo ("<tr><td colspan=3>&nbsp;</td></tr>"); echo ("<tr><td colspan=3>&nbsp;</td></tr>");
// access level // access level
echo ("<tr><td align=\"right\"><b>". echo ("<tr><td align=\"right\">".
_("Access level") . ": </b></td>". _("Access level") . " </td>".
"<td><select tabindex=\"$tabindex\" name=\"accessLevel\">\n"); "<td><select tabindex=\"$tabindex\" name=\"accessLevel\">\n");
if ($conf->getAccessLevel() == LAMConfig::ACCESS_ALL) { if ($conf->getAccessLevel() == LAMConfig::ACCESS_ALL) {
echo("<option selected value=" . LAMConfig::ACCESS_ALL . ">" . _('Write access') . "</option>\n"); echo("<option selected value=" . LAMConfig::ACCESS_ALL . ">" . _('Write access') . "</option>\n");
@ -353,12 +353,12 @@ echo ("</fieldset>");
echo ("<br>"); echo ("<br>");
echo ("<fieldset><legend><img align=\"middle\" src=\"../../graphics/language.png\" alt=\"language.png\"> <b>" . _("Language settings") . "</b></legend><br>\n"); echo ("<fieldset><legend><img align=\"middle\" src=\"../../graphics/language.png\" alt=\"language.png\"> " . _("Language settings") . "</legend><br>\n");
echo ("<table border=0>\n"); echo ("<table border=0>\n");
// language // language
echo ("<tr>"); echo ("<tr>");
echo ("<td><b>" . _("Default language") . ":</b></td><td>\n"); echo ("<td>" . _("Default language") . "</td><td>\n");
// read available languages // read available languages
$languagefile = "../../config/language"; $languagefile = "../../config/language";
if(is_file($languagefile)) if(is_file($languagefile))
@ -398,24 +398,24 @@ echo ("</fieldset>\n");
echo ("<br>\n"); echo ("<br>\n");
// lamdaemon settings // lamdaemon settings
echo ("<fieldset><legend><img align=\"middle\" src=\"../../graphics/lamdaemon.png\" alt=\"lamdaemon.png\"> <b>" . _("Lamdaemon settings") . "</b></legend><br>\n"); echo ("<fieldset><legend><img align=\"middle\" src=\"../../graphics/lamdaemon.png\" alt=\"lamdaemon.png\"> " . _("Lamdaemon settings") . "</legend><br>\n");
echo ("<table border=0>\n"); echo ("<table border=0>\n");
echo ("<tr><td align=\"right\"><b>". echo ("<tr><td align=\"right\">".
_("Server list") . ": </b></td>". _("Server list") . " </td>".
"<td><input tabindex=\"$tabindex\" size=50 type=\"text\" name=\"scriptservers\" value=\"" . $conf->get_scriptServers(false) . "\"></td>\n"); "<td><input tabindex=\"$tabindex\" size=50 type=\"text\" name=\"scriptservers\" value=\"" . $conf->get_scriptServers(false) . "\"></td>\n");
$tabindex++; $tabindex++;
echo "<td>"; echo "<td>";
printHelpLink(getHelp('', '218'), '218'); printHelpLink(getHelp('', '218'), '218');
echo "</td></tr>\n"; echo "</td></tr>\n";
echo ("<tr><td align=\"right\"><b>". echo ("<tr><td align=\"right\">".
_("Path to external script") . ": </b></td>". _("Path to external script") . " </td>".
"<td><input tabindex=\"$tabindex\" size=50 type=\"text\" name=\"scriptpath\" value=\"" . $conf->get_scriptPath() . "\"></td>\n"); "<td><input tabindex=\"$tabindex\" size=50 type=\"text\" name=\"scriptpath\" value=\"" . $conf->get_scriptPath() . "\"></td>\n");
$tabindex++; $tabindex++;
echo "<td>"; echo "<td>";
printHelpLink(getHelp('', '210'), '210'); printHelpLink(getHelp('', '210'), '210');
echo "</td></tr>\n"; echo "</td></tr>\n";
echo "<tr><td align=\"right\"><b>". _("Rights for the home directory") . ": </b></td>\n"; echo "<tr><td align=\"right\">". _("Rights for the home directory") . " </td>\n";
$owr = ""; $owr = "";
$oww = ""; $oww = "";
$owe = ""; $owe = "";
@ -464,12 +464,32 @@ echo ("</fieldset>\n");
echo ("<br>\n"); echo ("<br>\n");
// LAM Pro settings
if (isLAMProVersion()) {
$pwdMailContent = new htmlTable();
$pwdMailFrom = new htmlTableExtendedInputField(_('From address'), 'pwdResetMail_from', $conf->getLamProMailFrom(), '550');
$pwdMailContent->addElement($pwdMailFrom, true);
$pwdMailSubject = new htmlTableExtendedInputField(_('Subject'), 'pwdResetMail_subject', $conf->getLamProMailSubject(), '551');
$pwdMailContent->addElement($pwdMailSubject, true);
$pwdMailBody = new htmlTableExtendedInputTextarea('pwdResetMail_body', $conf->getLamProMailText(), 50, 4, _('Text'), '552');
$pwdMailContent->addElement($pwdMailBody, true);
$pwdMailFieldset = new htmlFieldset($pwdMailContent, _("Password mail settings"), '../../graphics/mailBig.png');
parseHtml(null, $pwdMailFieldset, array(), true, $tabindex, 'config');
echo ("<br>\n");
}
// security setings // security setings
echo ("<fieldset><legend><img align=\"middle\" src=\"../../graphics/security.png\" alt=\"security.png\"> <b>" . _("Security settings") . "</b></legend><br>\n"); echo ("<fieldset><legend><img align=\"middle\" src=\"../../graphics/security.png\" alt=\"security.png\"> " . _("Security settings") . "</legend><br>\n");
echo ("<table border=0>\n"); echo ("<table border=0>\n");
// login method // login method
echo ("<tr><td align=\"right\"><b>". echo ("<tr><td align=\"right\">".
_("Login method") . ": </b></td>". _("Login method") . " </td>".
"<td><select tabindex=\"$tabindex\" name=\"loginMethod\" onchange=\"configLoginMethodChanged()\">\n"); "<td><select tabindex=\"$tabindex\" name=\"loginMethod\" onchange=\"configLoginMethodChanged()\">\n");
if ($conf->getLoginMethod() == LAMConfig::LOGIN_LIST) { if ($conf->getLoginMethod() == LAMConfig::LOGIN_LIST) {
echo("<option selected value=" . LAMConfig::LOGIN_LIST . ">" . _('Fixed list') . "</option>\n"); echo("<option selected value=" . LAMConfig::LOGIN_LIST . ">" . _('Fixed list') . "</option>\n");
@ -491,8 +511,7 @@ echo "</td></tr>\n";
// admin list // admin list
$adminText = implode("\n", explode(";", $conf->get_Adminstring())); $adminText = implode("\n", explode(";", $conf->get_Adminstring()));
echo "<tr id=\"trAdminList\"><td align=\"right\">\n"; echo "<tr id=\"trAdminList\"><td align=\"right\">\n";
echo "<b>". echo _("List of valid users") . " * </td>".
_("List of valid users") . " *: </b></td>".
"<td><textarea tabindex=\"$tabindex\" name=\"admins\" cols=75 rows=3>" . $adminText . "</textarea></td>\n"; "<td><textarea tabindex=\"$tabindex\" name=\"admins\" cols=75 rows=3>" . $adminText . "</textarea></td>\n";
echo "<td>"; echo "<td>";
printHelpLink(getHelp('', '207'), '207'); printHelpLink(getHelp('', '207'), '207');
@ -500,8 +519,7 @@ echo "</td></tr>\n";
$tabindex++; $tabindex++;
// login search suffix // login search suffix
echo "<tr id=\"trLoginSearchSuffix\"><td align=\"right\">\n"; echo "<tr id=\"trLoginSearchSuffix\"><td align=\"right\">\n";
echo "<b>". echo _("LDAP suffix") . " * </td>".
_("LDAP suffix") . " *: </b></td>".
"<td><input type=\"text\" tabindex=\"$tabindex\" name=\"loginSearchSuffix\" value=\"" . $conf->getLoginSearchSuffix() . "\" size=50></td>\n"; "<td><input type=\"text\" tabindex=\"$tabindex\" name=\"loginSearchSuffix\" value=\"" . $conf->getLoginSearchSuffix() . "\" size=50></td>\n";
echo "<td>"; echo "<td>";
printHelpLink(getHelp('', '221'), '221'); printHelpLink(getHelp('', '221'), '221');
@ -509,8 +527,7 @@ echo "</td></tr>\n";
$tabindex++; $tabindex++;
// login search filter // login search filter
echo "<tr id=\"trLoginSearchFilter\"><td align=\"right\">\n"; echo "<tr id=\"trLoginSearchFilter\"><td align=\"right\">\n";
echo "<b>". echo _("LDAP filter") . " * </td>".
_("LDAP filter") . " *: </b></td>".
"<td><input type=\"text\" tabindex=\"$tabindex\" name=\"loginSearchFilter\" value=\"" . $conf->getLoginSearchFilter() . "\" size=50></td>\n"; "<td><input type=\"text\" tabindex=\"$tabindex\" name=\"loginSearchFilter\" value=\"" . $conf->getLoginSearchFilter() . "\" size=50></td>\n";
echo "<td>"; echo "<td>";
printHelpLink(getHelp('', '221'), '221'); printHelpLink(getHelp('', '221'), '221');
@ -520,16 +537,16 @@ $tabindex++;
echo ("<tr><td colspan=3>&nbsp;</td></tr>\n"); echo ("<tr><td colspan=3>&nbsp;</td></tr>\n");
// new password // new password
echo ("<tr><td align=\"right\"><font color=\"red\"><b>". echo ("<tr><td align=\"right\"><font color=\"red\">".
_("New password") . ": </b></font></td>". _("New password") . " </font></td>".
"<td align=\"left\"><input tabindex=\"$tabindex\" type=\"password\" name=\"passwd1\"></td>\n"); "<td align=\"left\"><input tabindex=\"$tabindex\" type=\"password\" name=\"passwd1\"></td>\n");
$tabindex++; $tabindex++;
echo "<td rowspan=2>"; echo "<td rowspan=2>";
printHelpLink(getHelp('', '212'), '212'); printHelpLink(getHelp('', '212'), '212');
echo "</td></tr>\n"; echo "</td></tr>\n";
// reenter password // reenter password
echo ("<tr><td align=\"right\"><font color=\"red\"><b>". echo ("<tr><td align=\"right\"><font color=\"red\">".
_("Reenter password") . ": </b></font></td>". _("Reenter password") . " </font></td>".
"<td align=\"left\"><input tabindex=\"$tabindex\" type=\"password\" name=\"passwd2\"></td></tr>\n"); "<td align=\"left\"><input tabindex=\"$tabindex\" type=\"password\" name=\"passwd2\"></td></tr>\n");
$tabindex++; $tabindex++;
echo ("</table>\n"); echo ("</table>\n");
@ -570,6 +587,11 @@ function checkInput() {
$conf->set_searchLimit($_POST['searchLimit']); $conf->set_searchLimit($_POST['searchLimit']);
if (isLAMProVersion()) { if (isLAMProVersion()) {
$conf->setAccessLevel($_POST['accessLevel']); $conf->setAccessLevel($_POST['accessLevel']);
if (!$conf->setLamProMailFrom($_POST['pwdResetMail_from'])) {
$errors[] = array("ERROR", _("From address for password mails is invalid."), $_POST['pwdResetMail_from']);
}
$conf->setLamProMailSubject($_POST['pwdResetMail_subject']);
$conf->setLamProMailText($_POST['pwdResetMail_body']);
} }
$adminText = $_POST['admins']; $adminText = $_POST['admins'];
$adminText = explode("\n", $adminText); $adminText = explode("\n", $adminText);