period: fix method hasPreviousUser and create method isChangedUser, and use it in Notification

This commit is contained in:
2022-04-22 12:12:30 +02:00
parent f7d9551dc1
commit 2d9af8f8c0
3 changed files with 42 additions and 2 deletions

View File

@@ -58,7 +58,7 @@ class UserRefEventSubscriber implements EventSubscriberInterface
public function postUpdate(AccompanyingPeriod $period, LifecycleEventArgs $args): void
{
if ($period->hasPreviousUser()
if ($period->isChangedUser()
&& $period->getUser() !== $this->security->getUser()
&& null !== $period->getUser()
&& $period->getStep() !== AccompanyingPeriod::STEP_DRAFT