mirror of
https://github.com/Part-DB/Part-DB-server.git
synced 2025-06-21 17:39:06 +02:00
Log the name of the CLI user, when actions were done from the CLI.
This commit is contained in:
parent
c91a6640ff
commit
6443d8e2bf
6 changed files with 124 additions and 2 deletions
|
@ -226,6 +226,14 @@ class LogDataTable implements DataTableTypeInterface
|
|||
|
||||
//If user was deleted, show the info from the username field
|
||||
if ($user === null) {
|
||||
if ($context->isCLIUser()) {
|
||||
return sprintf('%s [%s]',
|
||||
htmlentities($context->getCLIUsername()),
|
||||
$this->translator->trans('log.cli_user')
|
||||
);
|
||||
}
|
||||
|
||||
//Else we just deal with a deleted user
|
||||
return sprintf(
|
||||
'@%s [%s]',
|
||||
htmlentities($context->getUsername()),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue