X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;f=src%2FWallabag%2FCoreBundle%2FEventListener%2FRegistrationConfirmedListener.php;fp=src%2FWallabag%2FCoreBundle%2FEventListener%2FRegistrationConfirmedListener.php;h=0000000000000000000000000000000000000000;hb=ca17abce2d3963e266bee905ab084ddfa7e1ff18;hp=10586126fe35f43ef5ae45a1d1e635686259adb0;hpb=114c55c0a6eade2ba6c53fe25f61cc58cca91620;p=github%2Fwallabag%2Fwallabag.git diff --git a/src/Wallabag/CoreBundle/EventListener/RegistrationConfirmedListener.php b/src/Wallabag/CoreBundle/EventListener/RegistrationConfirmedListener.php deleted file mode 100644 index 10586126..00000000 --- a/src/Wallabag/CoreBundle/EventListener/RegistrationConfirmedListener.php +++ /dev/null @@ -1,50 +0,0 @@ -em = $em; - $this->theme = $theme; - $this->itemsOnPage = $itemsOnPage; - $this->rssLimit = $rssLimit; - $this->language = $language; - } - - public static function getSubscribedEvents() - { - return [ - FOSUserEvents::REGISTRATION_CONFIRMED => 'authenticate', - ]; - } - - public function authenticate(FilterUserResponseEvent $event, $eventName = null, EventDispatcherInterface $eventDispatcher = null) - { - if (!$event->getUser()->isEnabled()) { - return; - } - - $config = new Config($event->getUser()); - $config->setTheme($this->theme); - $config->setItemsPerPage($this->itemsOnPage); - $config->setRssLimit($this->rssLimit); - $config->setLanguage($this->language); - $this->em->persist($config); - $this->em->flush(); - } -}