aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/Wallabag/UserBundle
diff options
context:
space:
mode:
Diffstat (limited to 'src/Wallabag/UserBundle')
-rw-r--r--src/Wallabag/UserBundle/EventListener/CreateConfigListener.php8
-rw-r--r--src/Wallabag/UserBundle/Repository/UserRepository.php8
-rw-r--r--src/Wallabag/UserBundle/Resources/config/services.yml2
3 files changed, 9 insertions, 9 deletions
diff --git a/src/Wallabag/UserBundle/EventListener/CreateConfigListener.php b/src/Wallabag/UserBundle/EventListener/CreateConfigListener.php
index 5cabfd35..81954213 100644
--- a/src/Wallabag/UserBundle/EventListener/CreateConfigListener.php
+++ b/src/Wallabag/UserBundle/EventListener/CreateConfigListener.php
@@ -18,19 +18,19 @@ class CreateConfigListener implements EventSubscriberInterface
18 private $em; 18 private $em;
19 private $theme; 19 private $theme;
20 private $itemsOnPage; 20 private $itemsOnPage;
21 private $rssLimit; 21 private $feedLimit;
22 private $language; 22 private $language;
23 private $readingSpeed; 23 private $readingSpeed;
24 private $actionMarkAsRead; 24 private $actionMarkAsRead;
25 private $listMode; 25 private $listMode;
26 private $session; 26 private $session;
27 27
28 public function __construct(EntityManager $em, $theme, $itemsOnPage, $rssLimit, $language, $readingSpeed, $actionMarkAsRead, $listMode, Session $session) 28 public function __construct(EntityManager $em, $theme, $itemsOnPage, $feedLimit, $language, $readingSpeed, $actionMarkAsRead, $listMode, Session $session)
29 { 29 {
30 $this->em = $em; 30 $this->em = $em;
31 $this->theme = $theme; 31 $this->theme = $theme;
32 $this->itemsOnPage = $itemsOnPage; 32 $this->itemsOnPage = $itemsOnPage;
33 $this->rssLimit = $rssLimit; 33 $this->feedLimit = $feedLimit;
34 $this->language = $language; 34 $this->language = $language;
35 $this->readingSpeed = $readingSpeed; 35 $this->readingSpeed = $readingSpeed;
36 $this->actionMarkAsRead = $actionMarkAsRead; 36 $this->actionMarkAsRead = $actionMarkAsRead;
@@ -54,7 +54,7 @@ class CreateConfigListener implements EventSubscriberInterface
54 $config = new Config($event->getUser()); 54 $config = new Config($event->getUser());
55 $config->setTheme($this->theme); 55 $config->setTheme($this->theme);
56 $config->setItemsPerPage($this->itemsOnPage); 56 $config->setItemsPerPage($this->itemsOnPage);
57 $config->setRssLimit($this->rssLimit); 57 $config->setFeedLimit($this->feedLimit);
58 $config->setLanguage($this->session->get('_locale', $this->language)); 58 $config->setLanguage($this->session->get('_locale', $this->language));
59 $config->setReadingSpeed($this->readingSpeed); 59 $config->setReadingSpeed($this->readingSpeed);
60 $config->setActionMarkAsRead($this->actionMarkAsRead); 60 $config->setActionMarkAsRead($this->actionMarkAsRead);
diff --git a/src/Wallabag/UserBundle/Repository/UserRepository.php b/src/Wallabag/UserBundle/Repository/UserRepository.php
index be693d3b..4abd55f1 100644
--- a/src/Wallabag/UserBundle/Repository/UserRepository.php
+++ b/src/Wallabag/UserBundle/Repository/UserRepository.php
@@ -9,18 +9,18 @@ use Wallabag\UserBundle\Entity\User;
9class UserRepository extends EntityRepository 9class UserRepository extends EntityRepository
10{ 10{
11 /** 11 /**
12 * Find a user by its username and rss roken. 12 * Find a user by its username and Feed token.
13 * 13 *
14 * @param string $username 14 * @param string $username
15 * @param string $rssToken 15 * @param string $feedToken
16 * 16 *
17 * @return User|null 17 * @return User|null
18 */ 18 */
19 public function findOneByUsernameAndRsstoken($username, $rssToken) 19 public function findOneByUsernameAndFeedtoken($username, $feedToken)
20 { 20 {
21 return $this->createQueryBuilder('u') 21 return $this->createQueryBuilder('u')
22 ->leftJoin('u.config', 'c') 22 ->leftJoin('u.config', 'c')
23 ->where('c.rssToken = :rss_token')->setParameter('rss_token', $rssToken) 23 ->where('c.feedToken = :feed_token')->setParameter('feed_token', $feedToken)
24 ->andWhere('u.username = :username')->setParameter('username', $username) 24 ->andWhere('u.username = :username')->setParameter('username', $username)
25 ->getQuery() 25 ->getQuery()
26 ->getOneOrNullResult(); 26 ->getOneOrNullResult();
diff --git a/src/Wallabag/UserBundle/Resources/config/services.yml b/src/Wallabag/UserBundle/Resources/config/services.yml
index 72cda3f8..2dcf3011 100644
--- a/src/Wallabag/UserBundle/Resources/config/services.yml
+++ b/src/Wallabag/UserBundle/Resources/config/services.yml
@@ -28,7 +28,7 @@ services:
28 - "@doctrine.orm.entity_manager" 28 - "@doctrine.orm.entity_manager"
29 - "%wallabag_core.theme%" 29 - "%wallabag_core.theme%"
30 - "%wallabag_core.items_on_page%" 30 - "%wallabag_core.items_on_page%"
31 - "%wallabag_core.rss_limit%" 31 - "%wallabag_core.feed_limit%"
32 - "%wallabag_core.language%" 32 - "%wallabag_core.language%"
33 - "%wallabag_core.reading_speed%" 33 - "%wallabag_core.reading_speed%"
34 - "%wallabag_core.action_mark_as_read%" 34 - "%wallabag_core.action_mark_as_read%"