* AsyncServices/Calendar: when multiple alarms / async jobs run at same time, they send mail with from address of first alarm/job

caused by ExecMethod re-using objects instanciated in $GLOBALS, which get now unset when user-context needs to change because async job runs under different user
This commit is contained in:
Ralf Becker 2012-05-15 12:15:18 +00:00
parent ca6874b89b
commit d2a667c040

View File

@ -401,6 +401,11 @@ class asyncservice
//
if ($GLOBALS['egw_info']['user']['account_id'] != $job['account_id'])
{
// unset all objects in $GLOBALS, which are created and used by ExecMethod, as they can contain user-data
foreach($GLOBALS as $name => $value)
{
if ($name !== 'egw' && is_object($value)) unset($GLOBALS[$name]);
}
$domain = $GLOBALS['egw_info']['user']['domain'];
$lang = $GLOBALS['egw_info']['user']['preferences']['common']['lang'];
unset($GLOBALS['egw_info']['user']);