"only use default addressbook, if none is specified AND no existing contact already in a defined addressbook"

This commit is contained in:
Ralf Becker 2009-07-09 13:02:57 +00:00
parent 69d377b5d5
commit 25dc87e835

View File

@ -452,7 +452,7 @@ switch($_POST['action'])
$values[$user] = $GLOBALS['egw']->accounts->name2id($values[$user],'account_lid',$user=='owner'?null:'u');
}
}
if (!in_array('owner',$addr_fields) || !$values['owner'])
if (!isset($values['owner']) || isset($values['owner']) && !$values['owner'])
{
// use default addressbook for new contacts (user preferences), if no owner specified
if(!($values['owner'] = $GLOBALS['egw_info']['user']['preferences']['addressbook']['add_default']))