Beispiel #1
0
 /**
  * @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;
     }
 }
Beispiel #2
0
 /**
  * @return string[]
  */
 public function getEventTypes()
 {
     return array(LoginEvent::getName(), RegistrationEvent::getName(), NewPasswordEvent::getName(), PasswordRecoveryEvent::getName());
 }