/** * @param \Venne\Security\User $entity * @param \Doctrine\ORM\Event\LifecycleEventArgs $event */ public function postPersist(User $entity, LifecycleEventArgs $event) { if (!self::$lock) { self::$lock = true; $this->notificationManager->notify(RegistrationEvent::getName(), $entity, 'registration', 'User has been registered.', $entity); self::$lock = false; } }
/** * @return string[] */ public function getEventTypes() { return array(LoginEvent::getName(), RegistrationEvent::getName(), NewPasswordEvent::getName(), PasswordRecoveryEvent::getName()); }