From a59d33723cdfe9a655dfa63be32b002f62f1daca Mon Sep 17 00:00:00 2001 From: Nathan Gray Date: Wed, 24 Mar 2010 15:43:52 +0000 Subject: [PATCH] Don't change a user account into a regular contact --- .../inc/class.addressbook_import_contacts_csv.inc.php | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/addressbook/inc/class.addressbook_import_contacts_csv.inc.php b/addressbook/inc/class.addressbook_import_contacts_csv.inc.php index 00e5f0058e..ace7c24289 100644 --- a/addressbook/inc/class.addressbook_import_contacts_csv.inc.php +++ b/addressbook/inc/class.addressbook_import_contacts_csv.inc.php @@ -211,6 +211,11 @@ class addressbook_import_contacts_csv implements importexport_iface_import_plugi // Only update if there are changes $old = $this->bocontacts->read($_data['id']); + // Don't change a user account into a contact + if($old['owner'] == 0) { + unset($_data['owner']); + } + // Merge to deal with fields not in import record $_data = array_merge($old, $_data); $changed = $this->tracking->changed_fields($_data, $old);