chg: [logging] Add user id to sys logged actions

When a user performs an action, the user id is not logged with it.
As a result, when multiple users are doing changes in MIPS it is hard to
track which user did what.

This change will prepend the user id to sys logged actions.
pull/8975/head
Sura De Silva 2023-03-22 12:54:37 +11:00
parent c979ab33f4
commit 23350ce492
1 changed files with 1 additions and 1 deletions

View File

@ -275,7 +275,7 @@ class AuditLog extends AppModel
}
}
if ($this->syslog) {
$entry = $data['AuditLog']['action'];
$entry = "User (" . $data['AuditLog']['user_id'] . ") -- " . $data['AuditLog']['action'];
$title = $this->generateUserFriendlyTitle($data['AuditLog']);
if ($title) {
$entry .= " -- $title";