From c94a591fee6b3bd65d085a00d3bf116eb87a5c1f Mon Sep 17 00:00:00 2001 From: Nathan Gray Date: Mon, 14 Mar 2011 23:42:24 +0000 Subject: [PATCH] Make account name->id translator able to handle any IDs that are passed --- importexport/inc/class.importexport_helper_functions.inc.php | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/importexport/inc/class.importexport_helper_functions.inc.php b/importexport/inc/class.importexport_helper_functions.inc.php index e3eb56d842..a9cc22577f 100755 --- a/importexport/inc/class.importexport_helper_functions.inc.php +++ b/importexport/inc/class.importexport_helper_functions.inc.php @@ -97,6 +97,11 @@ class importexport_helper_functions { public static function account_name2id( $_account_lids ) { $account_lids = is_array( $_account_lids ) ? $_account_lids : explode( ',', $_account_lids ); foreach ( $account_lids as $account_lid ) { + // Handle any IDs that slip in + if(is_numeric($account_lid) && $GLOBALS['egw']->accounts->id2name($account_lid)) { + $account_ids[] = (int)$account_lid; + continue; + } if ( $account_id = $GLOBALS['egw']->accounts->name2id( $account_lid )) { $account_ids[] = $account_id; }