Infolog: Make sure to use the current user as set in Tracking, rather than $GLOBALS[egw_info']['user']['ccount_id'] when getting reply_to because we change the GLOBALS user when generating the notification.

This commit is contained in:
nathan 2022-05-05 14:08:26 -06:00
parent 063c772fbb
commit 245fbb2d82

View File

@ -328,8 +328,10 @@ class infolog_tracking extends Api\Storage\Tracking
switch($name)
{
case 'reply_to': // for async notification use owner of infolog, otherwise the user causing the change
if (($reply_to = Api\Accounts::getInstance()->id2name(!empty($GLOBALS['egw_info']['flags']['async-service']) ?
$data['info_owner'] : $GLOBALS['egw_info']['user']['account_id'], 'account_email')))
if(($reply_to = Api\Accounts::getInstance()
->id2name(!empty($GLOBALS['egw_info']['flags']['async-service']) ?
$data['info_owner'] : $this->user, 'account_email'
)))
{
$config = $reply_to;
}