mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-12-18 12:41:10 +01:00
fix for function identity_name to use the same logic on missing identity values (like ident_realname and ident_email) as iterator on identities; if no ident_email is present use the users email-address, if still empty use acc_imap_username if it passes a simple test on qualifying as email address
This commit is contained in:
parent
caa1f2247d
commit
7493c69ece
@ -1498,7 +1498,13 @@ class emailadmin_account implements ArrayAccess
|
||||
$account = array_merge($account, emailadmin_credentials::from_session($account));
|
||||
}
|
||||
}
|
||||
if (empty($account['ident_email']) && !empty($account['acc_imap_username']))
|
||||
// fill an empty ident_realname or ident_email of current user with data from user account
|
||||
if ($replace_placeholders && (!isset($account_id) || $account_id == $GLOBALS['egw_info']['user']['acount_id']))
|
||||
{
|
||||
if (empty($account['ident_realname'])) $account['ident_realname'] = $GLOBALS['egw_info']['user']['account_fullname'];
|
||||
if (empty($account['ident_email'])) $account['ident_email'] = $GLOBALS['egw_info']['user']['account_email'];
|
||||
}
|
||||
if (empty($account['ident_email']) && !empty($account['acc_imap_username']) && strpos($account['acc_imap_username'], '@') !== false)
|
||||
{
|
||||
$account['ident_email'] = $account['acc_imap_username'];
|
||||
}
|
||||
|
@ -807,7 +807,7 @@ class mail_ui
|
||||
// not to be used for IMAP Foldertree, as there is no Imap host
|
||||
continue;
|
||||
}
|
||||
$identity_name = emailadmin_account::identity_name($accountObj);
|
||||
$identity_name = emailadmin_account::identity_name($accountObj,true,$GLOBALS['egw_info']['user']['acount_id']);
|
||||
$oA = array('id' => $acc_id,
|
||||
'text' => str_replace(array('<','>'),array('[',']'),$identity_name),// as angle brackets are quoted, display in Javascript messages when used is ugly, so use square brackets instead
|
||||
'tooltip' => '('.$acc_id.') '.htmlspecialchars_decode($identity_name),
|
||||
@ -1069,7 +1069,7 @@ class mail_ui
|
||||
// not to be used for IMAP Foldertree, as there is no Imap host
|
||||
continue;
|
||||
}
|
||||
$identity_name = emailadmin_account::identity_name($accountObj);
|
||||
$identity_name = emailadmin_account::identity_name($accountObj,true,$GLOBALS['egw_info']['user']['acount_id']);
|
||||
$accArray[$acc_id] = str_replace(array('<','>'),array('[',']'),$identity_name);// as angle brackets are quoted, display in Javascript messages when used is ugly, so use square brackets instead
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user