fix group memberships got lost editing primary-group of an account

This commit is contained in:
Ralf Becker 2018-09-06 15:23:32 +02:00
parent 58703cbaba
commit 3161444d09

View File

@ -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'];
}