From 8dfea111061fc12766875c72b677dbe0b3a7daeb Mon Sep 17 00:00:00 2001 From: Nathan Gray Date: Mon, 5 May 2014 14:46:01 +0000 Subject: [PATCH] Make sure primary group is in group list Fixes Default group always added if primary group is not Default --- admin/inc/class.admin_account.inc.php | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/admin/inc/class.admin_account.inc.php b/admin/inc/class.admin_account.inc.php index 817b9c38de..ac84bd3dd9 100644 --- a/admin/inc/class.admin_account.inc.php +++ b/admin/inc/class.admin_account.inc.php @@ -154,6 +154,11 @@ class admin_account break; } } + // Make sure primary group is in account groups + if($account['account_primary_group'] && !array_search($account['account_primary_group'], $account['account_groups'])) + { + $account['account_groups'][] = $account['account_primary_group']; + } $cmd = new admin_cmd_edit_user((int)$content['account_id'], $account); $cmd->run();