set primary group to the first group of the user or the Default group, if it is not set

This commit is contained in:
Ralf Becker 2003-09-13 19:06:10 +00:00
parent 9cb610ad6d
commit 850b3f6b4f

View File

@ -1115,6 +1115,10 @@
$groups_select .= '>' . $value['account_lid'] . '</option>'."\n";
}
if (!$userData['account_primary_group'])
{
$userData['account_primary_group'] = @$userGroups[0]['account_id'] ? @$userGroups[0]['account_id'] : $account->name2id('Default');
}
foreach($allGroups as $key => $value)
{
# print "<br>$key =>";