diff --git a/src/Entity/LogSystem/ElementCreatedLogEntry.php b/src/Entity/LogSystem/ElementCreatedLogEntry.php index e49e4d0d..cc591db3 100644 --- a/src/Entity/LogSystem/ElementCreatedLogEntry.php +++ b/src/Entity/LogSystem/ElementCreatedLogEntry.php @@ -45,6 +45,8 @@ namespace App\Entity\LogSystem; use App\Entity\Base\AbstractDBElement; use App\Entity\Contracts\LogWithCommentInterface; use App\Entity\Contracts\LogWithEventUndoInterface; +use App\Entity\UserSystem\Group; +use App\Entity\UserSystem\User; use Doctrine\ORM\Mapping as ORM; /** @@ -59,6 +61,11 @@ class ElementCreatedLogEntry extends AbstractLogEntry implements LogWithCommentI parent::__construct(); $this->level = self::LEVEL_INFO; $this->setTargetElement($new_element); + + //Creation of new users is maybe more interesting... + if ($new_element instanceof User || $new_element instanceof Group) { + $this->level = self::LEVEL_NOTICE; + } } /** diff --git a/src/Entity/LogSystem/ElementDeletedLogEntry.php b/src/Entity/LogSystem/ElementDeletedLogEntry.php index cfcb6844..c6e6c4f3 100644 --- a/src/Entity/LogSystem/ElementDeletedLogEntry.php +++ b/src/Entity/LogSystem/ElementDeletedLogEntry.php @@ -47,6 +47,8 @@ use App\Entity\Contracts\LogWithCommentInterface; use App\Entity\Contracts\LogWithEventUndoInterface; use App\Entity\Contracts\NamedElementInterface; use App\Entity\Contracts\TimeTravelInterface; +use App\Entity\UserSystem\Group; +use App\Entity\UserSystem\User; use Doctrine\ORM\Mapping as ORM; /** @@ -61,6 +63,11 @@ class ElementDeletedLogEntry extends AbstractLogEntry implements TimeTravelInter parent::__construct(); $this->level = self::LEVEL_INFO; $this->setTargetElement($deleted_element); + + //Deletion of a user is maybe more interesting... + if ($deleted_element instanceof User || $deleted_element instanceof Group) { + $this->level = self::LEVEL_NOTICE; + } } /**