forked from extern/egroupware
Make account name->id translator able to handle any IDs that are passed
This commit is contained in:
parent
1e9f96e9a7
commit
c94a591fee
@ -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;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user