From 3161444d09baa92c3147492faa930a01edf09773 Mon Sep 17 00:00:00 2001 From: Ralf Becker Date: Thu, 6 Sep 2018 15:23:32 +0200 Subject: [PATCH] fix group memberships got lost editing primary-group of an account --- admin/inc/class.admin_account.inc.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/admin/inc/class.admin_account.inc.php b/admin/inc/class.admin_account.inc.php index b0604fb76d..f229961b3d 100644 --- a/admin/inc/class.admin_account.inc.php +++ b/admin/inc/class.admin_account.inc.php @@ -199,7 +199,8 @@ class admin_account } } // Make sure primary group is in account groups - if ($account['account_primary_group'] && !in_array($account['account_primary_group'], (array)$account['account_groups'])) + if (isset($account['account_groups']) && $account['account_primary_group'] && + !in_array($account['account_primary_group'], (array)$account['account_groups'])) { $account['account_groups'][] = $account['account_primary_group']; }