diff --git a/lam/lib/account.inc b/lam/lib/account.inc index cb0c02b8..0f459075 100644 --- a/lam/lib/account.inc +++ b/lam/lib/account.inc @@ -1686,9 +1686,9 @@ function creategroup($values) { // Will create the LDAP-Group $attr['gidNumber'] = $values->general_uidNumber; $attr['description'] = $values->general_gecos; if ($values->general_memeberUid) $attr['memberUid'] = $values->general_memberUid; - if ($_SESSION['config']->samba3 =='yes') { - $attr['objectClass'][1] = 'sambaGroupMapping'; + if ($_SESSION['config']->samba3 =='yes' && (isset($values->smb_mapgroup))) { $attr['sambaSID'] = $values->smb_mapgroup; + $attr['objectClass'][1] = 'sambaGroupMapping'; $attr['sambaGroupType'] = '2'; if ($values->general_gecos) $attr['displayName'] = $values->general_gecos; } diff --git a/lam/templates/masscreate.php b/lam/templates/masscreate.php index c97c7a96..178a1462 100644 --- a/lam/templates/masscreate.php +++ b/lam/templates/masscreate.php @@ -35,285 +35,331 @@ session_save_path('../sess'); setlanguage(); $time=time(); -if ($_POST['tolist'] && ($_FILES['userfile']['size']>0)) $select = 'list'; -if ($_POST['list']) $select = 'list'; -if ($_POST['back']) $select = 'main'; -if ($_POST['cancel']) $select = 'cancel'; -if ($_POST['create']) $select = 'create'; -if ($_POST['pdf']) { - createUserPDF($_SESSION['accounts']); - $select='pdf'; +if (count($_POST)==0) { + if (isset($_GET['list2'])) $select = 'list2'; + else if (isset($_GET['create'])) $select='create'; + else $select='main'; + } +else { + if ($_POST['tolist'] && ($_FILES['userfile']['size']>0)) $select = 'list'; + else if ($_POST['list2']) $select = 'list2'; + else if ($_POST['back']) $select = 'main'; + else if ($_POST['cancel']) $select = 'cancel'; + else if ($_POST['create']) $select = 'create'; + else if ($_POST['pdf']) { + createUserPDF($_SESSION['accounts']); + $select='pdf'; + } } -if (!$select && !$_SESSION['pointer']) $select='main'; -if (!$select && $_SESSION['pointer']) $select='create'; - if ($select!='pdf') { // Write HTML-Header and part of Table echo $_SESSION['header']; echo '