mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-06-07 18:44:08 +00:00
Feature: Track update of entities if no user is associated to the request
This happens in scripts/cli (messenger, ...)
This commit is contained in:
parent
c5989de120
commit
e80a6e417b
@ -62,11 +62,11 @@ class TrackCreateUpdateSubscriber implements EventSubscriber
|
||||
protected function onUpdate(object $object): void
|
||||
{
|
||||
if ($object instanceof TrackUpdateInterface) {
|
||||
$object->setUpdatedAt(new DateTimeImmutable('now'));
|
||||
$object->setUpdatedAt(new DateTimeImmutable('now'));
|
||||
|
||||
if ($this->security->getUser() instanceof User) {
|
||||
$object->setUpdatedBy($this->security->getUser());
|
||||
}
|
||||
if ($this->security->getUser() instanceof User) {
|
||||
$object->setUpdatedBy($this->security->getUser());
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user