show domains as list box in profile editor, minor changes
This commit is contained in:
parent
b2a5416013
commit
7a37639134
|
@ -4,8 +4,8 @@ unix_password_no: 0
|
|||
unix_pwdwarn: 10
|
||||
unix_pwdallowlogin: 10
|
||||
unix_pwdminage: 1
|
||||
unix_pwdmaxage: 180
|
||||
unix_pwdexpire: 1262300400
|
||||
unix_pwdmaxage: 365
|
||||
unix_pwdexpire: 1893452400
|
||||
unix_deactivated: 0
|
||||
smb_password_no: 0
|
||||
smb_useunixpwd: 1
|
||||
|
|
|
@ -104,7 +104,7 @@ class Ldap{
|
|||
|
||||
// closes connection to server
|
||||
function close() {
|
||||
if (isset($this->server)) ldap_close($this->server);
|
||||
@ldap_close($this->server);
|
||||
}
|
||||
|
||||
// searches LDAP for a specific user name
|
||||
|
|
|
@ -80,7 +80,22 @@ echo ("<tr><td> </td><td> </td><td> </td></tr>\n");
|
|||
// domain
|
||||
echo ("<tr>\n");
|
||||
echo ("<td align=\"right\"><b>" . _("Domain") . ": </b></td>\n");
|
||||
echo ("<td><input type=\"text\" value=\"" . $acct->smb_domain . "\" name=\"smb_domain\"></td>\n");
|
||||
if ($_SESSION['config']->get_samba3() == "yes") {
|
||||
echo "<td><select name=\"smb_domain\">\n";
|
||||
$doms = $_SESSION['ldap']->search_domains($_SESSION['config']->get_DomainSuffix());
|
||||
for ($i = 0; $i < sizeof($doms); $i++) {
|
||||
if (strtolower($acct->smb_domain) == strtolower($doms[$i]->name)) {
|
||||
echo ("<option selected>" . $acct->smb_domain . "</option>\n");
|
||||
}
|
||||
else {
|
||||
echo ("<option>" . $doms[$i]->name . "</option>\n");
|
||||
}
|
||||
}
|
||||
echo "</select></td>\n";
|
||||
}
|
||||
else {
|
||||
echo ("<td><input type=\"text\" value=\"" . $acct->smb_domain . "\" name=\"smb_domain\"></td>\n");
|
||||
}
|
||||
echo ("<td><a href=\"../help.php?HelpNumber=371\" target=\"lamhelp\">" . _("Help") . "</a></td>\n");
|
||||
echo ("</tr>\n");
|
||||
|
||||
|
|
|
@ -317,7 +317,22 @@ echo ("<tr><td> </td><td> </td><td> </td></tr>\n");
|
|||
// domain
|
||||
echo ("<tr>\n");
|
||||
echo ("<td align=\"right\"><b>" . _("Domain") . ": </b></td>\n");
|
||||
echo ("<td><input type=\"text\" value=\"" . $acct->smb_domain . "\" name=\"smb_domain\"></td>\n");
|
||||
if ($_SESSION['config']->get_samba3() == "yes") {
|
||||
echo "<td><select name=\"smb_domain\">\n";
|
||||
$doms = $_SESSION['ldap']->search_domains($_SESSION['config']->get_DomainSuffix());
|
||||
for ($i = 0; $i < sizeof($doms); $i++) {
|
||||
if (strtolower($acct->smb_domain) == strtolower($doms[$i]->name)) {
|
||||
echo ("<option selected>" . $acct->smb_domain . "</option>\n");
|
||||
}
|
||||
else {
|
||||
echo ("<option>" . $doms[$i]->name . "</option>\n");
|
||||
}
|
||||
}
|
||||
echo "</select></td>\n";
|
||||
}
|
||||
else {
|
||||
echo ("<td><input type=\"text\" value=\"" . $acct->smb_domain . "\" name=\"smb_domain\"></td>\n");
|
||||
}
|
||||
echo ("<td><a href=\"../help.php?HelpNumber=309\" target=\"lamhelp\">" . _("Help") . "</a></td>\n");
|
||||
echo ("</tr>\n");
|
||||
|
||||
|
|
Loading…
Reference in New Issue