* Admin: fixed fatal error when creating new users

This commit is contained in:
Ralf Becker 2013-05-21 18:03:44 +00:00
parent c9e8e0b115
commit 7806f183a9

View File

@ -1523,7 +1523,8 @@
// set primary group to default, if there is no primary group set; this may fail, if no group "Default" exists // set primary group to default, if there is no primary group set; this may fail, if no group "Default" exists
if (!$userData['account_primary_group']) if (!$userData['account_primary_group'])
{ {
$userData['account_primary_group'] = @$userGroups[0]['account_id'] ? @$userGroups[0]['account_id'] : $account->name2id('Default'); $userData['account_primary_group'] = @$userGroups[0]['account_id'] ?
@$userGroups[0]['account_id'] : $GLOBALS['egw']->accounts->name2id('Default');
} }
// prepare the allGroups array for use with the checkbox-multiselect use // prepare the allGroups array for use with the checkbox-multiselect use
$allGroupsBuff=array(); $allGroupsBuff=array();