Automatically translate owner field from name to id (happens after set translation on field)

This commit is contained in:
Nathan Gray 2011-03-15 00:02:54 +00:00
parent 9f32100656
commit 8c094fd6be

View File

@ -150,6 +150,9 @@ class addressbook_import_contacts_csv implements importexport_iface_import_plugi
// don't import empty contacts
if( count( array_unique( $record ) ) < 2 ) continue;
// Automatically handle text owner without explicit translation
$record['owner'] = importexport_helper_functions::account_name2id($record['owner']);
// Set owner, unless it's supposed to come from CSV file
if($_definition->plugin_options['owner_from_csv']) {
if(!is_numeric($record['owner'])) {