This is a confirmed bug in Vtiger 7.1 where the
$current_user global is overwritten by the workflow system before the ModTracker handler reads it.
Fix 1 — ModTrackerHandler.php (recommended)
Edit
modules/ModTracker/ModTrackerHandler.php.
Find the
handleEvent function. Replace:
php
global $adb, $current_user;
$userid = $current_user->id;
With:
php
global $adb;
$curid = isset($_SESSION['authenticated_user_id'])
? (int)$_SESSION['authenticated_user_id']
: 1;
$userid = $curid;
Fix 2 — WSAPPAssignToTracker.php (workaround)
In
modules/WSAPP/WorkFlowHandlers/WSAPPAssignToTracker.php, inside
handleEvent(), comment out:
php
// $current_user = $user; // ← this line overwrites the global
Root cause: Vtiger overwrites
$current_user in the workflow handler to run actions as the assigned user, but this breaks the audit trail for the same request.