diff --git a/lam/help/help.inc b/lam/help/help.inc index c6edd7a0..9b9fa3c1 100644 --- a/lam/help/help.inc +++ b/lam/help/help.inc @@ -184,6 +184,10 @@ $helpArray = array ( "Text" => _("Groupname Windows clients will show.")), "421" => array ("ext" => "FALSE", "Headline" => _("Load profile"), "Text" => _("You can select a previous defined profile here. All values which make senso to store in profile are overwritten with the stored values.")), + "422" => array ("ext" => "FALSE", "Headline" => _("Expand suffix with primary groupname"), + "Text" => _("If select users will be added with OUs expanded with their primary group. E.G a user is in group admin, user suffix will be ou=admin,+user suffix.")), + "423" => array ("ext" => "FALSE", "Headline" => _("Group suffix"), + "Text" => _("If a not yet existing group is defined in csv-file, a new group in the selected group suffix will be created.")), "424" => array ("ext" => "FALSE", "Headline" => _("Surname"), "Text" => _("Surname of user. Only letters, - and spaces are allowed.")), "425" => array ("ext" => "FALSE", "Headline" => _("Given name"), @@ -258,6 +262,8 @@ $helpArray = array ( "Text" => _("eMail address")), "457" => array ("ext" => "FALSE", "Headline" => _("Save profile"), "Text" => _("Save profile")), + "458" => array ("ext" => "FALSE", "Headline" => _("Select group profile"), + "Text" => _("If a not yet existing group is defined in csv-file, a new group with the selected group profile will be created.")), "460" => array ("ext" => "FALSE", "Headline" => _("Windows domain"), "Text" => _("Windows domain of host."). ' '. _("Can be left empty.")), "461" => array ("ext" => "FALSE", "Headline" => _("Suffix"), diff --git a/lam/templates/account/hostedit.php b/lam/templates/account/hostedit.php index aa66d61e..6b9a44f8 100644 --- a/lam/templates/account/hostedit.php +++ b/lam/templates/account/hostedit.php @@ -45,15 +45,6 @@ if (isset($_GET['DN'])) { $_SESSION['account']->general_dn = substr($_SESSION['account']->general_dn, strpos($_SESSION['account']->general_dn, ',')+1); $_SESSION['final_changegids'] = ''; } - else { - $_SESSION['account'] = loadHostProfile('default'); - $_SESSION['account'] ->type = 'host'; - $_SESSION['account']->smb_flagsW = 1; - $_SESSION['account']->smb_flagsX = 1; - $_SESSION['account']->general_homedir = '/dev/null'; - $_SESSION['account']->general_shell = '/bin/false'; - if (isset($_SESSION['account_old'])) unset($_SESSION['account_old']); - } } else if (count($_POST)==0) { // Startcondition. hostedit.php was called from outside $_SESSION['account'] = loadHostProfile('default'); @@ -88,6 +79,7 @@ switch ($_POST['select']) { // Select which part of page should be loaded and ch $_SESSION['account']->general_username = $_SESSION['account']->general_username . '$'; $errors[] = array('WARN', _('Host name'), _('Added $ to hostname.')); } + $tempname = $_SESSION['account']->general_username; // Check if Hostname contains only valid characters if ( !ereg('^([a-z]|[A-Z]|[0-9]|[.]|[-]|[$])*$', $_SESSION['account']->general_username)) $errors[] = array('ERROR', _('Host name'), _('Hostname contains invalid characters. Valid characters are: a-z, 0-9 and .-_ !')); @@ -121,7 +113,7 @@ switch ($_POST['select']) { // Select which part of page should be loaded and ch } $_SESSION['account']->general_username = $_SESSION['account']->general_username . "$"; } - if ($_SESSION['account']->general_username != $_POST['f_general_username']) + if ($_SESSION['account']->general_username != $tempname) $errors[] = array('WARN', _('Host name'), _('Hostname already in use. Selected next free hostname.')); // Check if UID is valid. If none value was entered, the next useable value will be inserted diff --git a/lam/templates/masscreate.php b/lam/templates/masscreate.php index 8957e5ef..4f51b766 100644 --- a/lam/templates/masscreate.php +++ b/lam/templates/masscreate.php @@ -66,6 +66,8 @@ if ($select!='pdf') { if ( isset($_SESSION['accounts'])) unset($_SESSION['accounts']); if ( isset($_SESSION['pointer'])) unset($_SESSION['pointer']); if ( isset($_SESSION['errors'])) unset($_SESSION['errors']); + if ( isset($_SESSION['group_suffix'])) unset($_SESSION['group_suffix']); + if ( isset($_SESSION['group_selectprofile'])) unset($_SESSION['group_selectprofile']); echo ''."\n". '
'."\n". '