Log the name of the CLI user, when actions were done from the CLI.

This commit is contained in:
Jan Böhmer 2023-04-07 22:44:59 +02:00
parent c91a6640ff
commit 6443d8e2bf
6 changed files with 124 additions and 2 deletions

View file

@ -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()),