Fix 'from' on email header
This commit is contained in:
parent
852f2d8da7
commit
f290ad51eb
@ -3,7 +3,7 @@
|
||||
function mfh_get_mail_headers_for_dropdown($user_id, $hesk_settings, $hesklang) {
|
||||
$deleted_user_text = hesk_dbEscape($hesklang['deleted_user_title_case']);
|
||||
$sql = "SELECT `mail`.`id` AS `id`, `mail`.`subject` AS `subject`,
|
||||
COALESCE(`users`.`name`, '{$deleted_user_text}') AS `from`, `mail`.`dt` AS `date`
|
||||
`users`.`name` AS `from`, `mail`.`dt` AS `date`, `mail`.`from` AS `from_id`
|
||||
FROM `" . hesk_dbEscape($hesk_settings['db_pfix']) . "mail` AS `mail`
|
||||
LEFT JOIN `" . hesk_dbEscape($hesk_settings['db_pfix']) . "users` AS `users`
|
||||
ON `mail`.`from` = `users`.`id`
|
||||
@ -15,6 +15,14 @@ function mfh_get_mail_headers_for_dropdown($user_id, $hesk_settings, $hesklang)
|
||||
|
||||
$mails = array();
|
||||
while ($row = hesk_dbFetchAssoc($rs)) {
|
||||
if ($row['from'] == null) {
|
||||
if ($row['from_id'] == 9999) {
|
||||
$row['from'] = 'HESK.com';
|
||||
} else {
|
||||
$row['from'] = $deleted_user_text;
|
||||
}
|
||||
}
|
||||
|
||||
$mails[] = $row;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user