diff --git a/lam/templates/profedit/profilecreate.php b/lam/templates/profedit/profilecreate.php
index dae2b673..c64b7598 100644
--- a/lam/templates/profedit/profilecreate.php
+++ b/lam/templates/profedit/profilecreate.php
@@ -249,7 +249,28 @@ if ($_GET['type'] == "user") {
// save host profile
elseif ($_GET['type'] == "host") {
-
+ $acct = new account();
+ // check input
+ if ($_POST['general_group'] && eregi("^[a-z]([a-z0-9_\\-])*$", $_POST['general_group'])) {
+ $acct->general_group = $_POST['general_group'];
+ }
+ else {
+ StatusMessage("ERROR", "", _("Primary group name is invalid!") . " " . $_POST['general_group']);
+ echo ("
" . _("Back to profile editor...") . "");
+ exit;
+ }
+ if ($_POST['smb_domain'] && eregi("^[a-z0-9_\\-]+$", $_POST['smb_domain'])) {
+ $acct->smb_domain = $_POST['smb_domain'];
+ }
+ elseif ($_POST['smb_domain']) {
+ StatusMessage("ERROR", "", _("Domain name is invalid!") . " " . $_POST['smb_domain']);
+ echo ("
" . _("Back to profile editor...") . "");
+ exit;
+ }
+ // save profile
+ saveHostProfile($acct, $profname);
+ echo ("
" . _("Profile ") . $profname . _(" was saved.") . "
"); + echo ("" . _("Back to profile editor") . "
"); } // error: no or wrong type diff --git a/lam/templates/profedit/profilehost.php b/lam/templates/profedit/profilehost.php index 55ce926f..68e59df7 100644 --- a/lam/templates/profedit/profilehost.php +++ b/lam/templates/profedit/profilehost.php @@ -25,6 +25,7 @@ $Id$ include_once("../../lib/profiles.inc"); include_once("../../lib/ldap.inc"); +include_once("../../lib/account.inc"); // start session session_save_path("../../sess"); @@ -36,3 +37,77 @@ if (!$_SESSION['ldap'] || !$_SESSION['ldap']->server()) { exit; } +// print header +echo ("\n"); +echo ("\n"); +echo ("\n