diff --git a/emailadmin/inc/class.emailadmin_account.inc.php b/emailadmin/inc/class.emailadmin_account.inc.php index 0e64378458..42ca10d9bc 100644 --- a/emailadmin/inc/class.emailadmin_account.inc.php +++ b/emailadmin/inc/class.emailadmin_account.inc.php @@ -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']; } diff --git a/mail/inc/class.mail_ui.inc.php b/mail/inc/class.mail_ui.inc.php index 2a14dd1522..27fa9639ea 100644 --- a/mail/inc/class.mail_ui.inc.php +++ b/mail/inc/class.mail_ui.inc.php @@ -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 } }