diff --git a/lam/lib/account.inc b/lam/lib/account.inc index 2ef8d403..20073003 100644 --- a/lam/lib/account.inc +++ b/lam/lib/account.inc @@ -769,7 +769,7 @@ function createuser($values) { // Will create the LDAP-Account addhomedir($values->general_username); } // Add User to Additional Groups - if ($values->general_groupadd) + if ($values->general_groupadd[0]) foreach ($values->general_groupadd as $group2) { $result = ldap_search($_SESSION['ldap']->server(), 'cn='.$group2.','.$_SESSION['config']->get_GroupSuffix(), "objectclass=posixGroup"); $entry = ldap_first_entry($_SESSION['ldap']->server(), $result); @@ -1013,7 +1013,7 @@ function createhost($values) { // Will create the LDAP-Account $success = ldap_add($_SESSION['ldap']->server(),$values->general_dn, $attr); if (!$success) return 4; // Add Host to Additional Groups - if ($values->general_groupadd) + if ($values->general_groupadd[0]) foreach ($values->general_groupadd as $group2) { $result = ldap_search($_SESSION['ldap']->server(), 'cn='.$group2.','.$_SESSION['config']->get_GroupSuffix(), "objectclass=posixGroup"); $entry = ldap_first_entry($_SESSION['ldap']->server(), $result); diff --git a/lam/templates/account.php b/lam/templates/account.php index 7e4edff2..ae96a069 100644 --- a/lam/templates/account.php +++ b/lam/templates/account.php @@ -239,7 +239,10 @@ switch ($_POST['select']) { // Select which part of page should be loaded and ch break; case 'finish': // Check if pdf-file should be created - if ($_POST['outputpdf']) createpdf($_SESSION['account']); + if ($_POST['outputpdf']) { + createpdf($_SESSION['account']); + $select_local = 'pdf'; + } break; } @@ -284,16 +287,18 @@ if ($_POST['load']) $select_local='load'; if ($_POST['save']) $select_local='save'; -// Write HTML-Header and part of Table -echo "\n"; -echo "