From a5009e9f3ac28e6c724006daf6be80712bef2d96 Mon Sep 17 00:00:00 2001 From: Nathan Gray Date: Mon, 23 Jan 2012 15:43:52 +0000 Subject: [PATCH] Read full account to fix group imports --- admin/inc/class.admin_import_groups_csv.inc.php | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/admin/inc/class.admin_import_groups_csv.inc.php b/admin/inc/class.admin_import_groups_csv.inc.php index b52687e408..0a61a5fb6d 100644 --- a/admin/inc/class.admin_import_groups_csv.inc.php +++ b/admin/inc/class.admin_import_groups_csv.inc.php @@ -129,10 +129,15 @@ class admin_import_groups_csv implements importexport_iface_import_plugin { 'query_type' => $condition['string'] )); if ( is_array( $accounts ) && count( $accounts ) >= 1 ) { + $account = current($accounts); // apply action to all contacts matching this exists condition $action = $condition['true']; foreach ( (array)$accounts as $account ) { + // Read full account, and copy needed info for accounts->save() + $account = $GLOBALS['egw']->accounts->read($account['account_id']); $record['account_id'] = $account['account_id']; + $record['account_firstname'] = $account['account_firstname']; + $record['account_lastname'] = $account['account_lastname']; $success = $this->action( $action['action'], $record, $import_csv->get_current_position() ); } } else {