From bfb4f24c933954580168799379146a69cfc73408 Mon Sep 17 00:00:00 2001 From: Roland Gruber Date: Thu, 29 Jun 2006 19:38:38 +0000 Subject: [PATCH] fixed problem when deleting users --- lam/HISTORY | 1 + lam/lib/lists.inc | 9 +++++++++ 2 files changed, 10 insertions(+) diff --git a/lam/HISTORY b/lam/HISTORY index 64036d73..ecd6d95f 100644 --- a/lam/HISTORY +++ b/lam/HISTORY @@ -3,6 +3,7 @@ -> Kolab: fixed problem with message about missing password -> Unix groups: fixed auto GID -> Shadow: account expiration date was incorrect in some time zones + -> User list: fixed problems when deleting users and translated GIDs are activated (1503367) 24.05.2006 1.0.2 diff --git a/lam/lib/lists.inc b/lam/lib/lists.inc index a16236c0..27a629a8 100644 --- a/lam/lib/lists.inc +++ b/lam/lib/lists.inc @@ -414,6 +414,15 @@ class lamList { elseif (isset($_POST['del'])){ // search for checkboxes $accounts = array_keys($_POST, "on"); + // skip trans_primary box + for ($i = 0; $i < sizeof($accounts); $i++) { + if ($accounts[$i] === 'trans_primary') { + unset($accounts[$i]); + $accounts = array_values($accounts); + break; + } + } + // build DN list $_SESSION['delete_dn'] = array(); for ($i = 0; $i < sizeof($accounts); $i++) { $_SESSION['delete_dn'][] = $this->entries[$accounts[$i]]['dn'];