Re-use FOSUser master branch

This commit is contained in:
Jeremy Benoist 2016-11-21 15:12:11 +01:00
parent 4da598c5df
commit 5066c3e066
No known key found for this signature in database
GPG key ID: BCA73962457ACC3C
4 changed files with 9 additions and 8 deletions

View file

@ -210,6 +210,7 @@ fos_user:
from_email:
address: "%from_email%"
sender_name: wallabag
fos_oauth_server:
db_driver: orm
client_class: Wallabag\ApiBundle\Entity\Client
@ -217,10 +218,10 @@ fos_oauth_server:
refresh_token_class: Wallabag\ApiBundle\Entity\RefreshToken
auth_code_class: Wallabag\ApiBundle\Entity\AuthCode
service:
user_provider: fos_user.user_manager
user_provider: fos_user.user_provider.username_email
options:
refresh_token_lifetime: 1209600
scheb_two_factor:
trusted_computer:
enabled: true

View file

@ -65,7 +65,7 @@
"liip/theme-bundle": "~1.1",
"lexik/form-filter-bundle": "~5.0",
"j0k3r/graby": "~1.0",
"friendsofsymfony/user-bundle": "dev-master#e168ed64629d034cb9cbbffb9d4350f62ef04fab as 2.0.x-dev",
"friendsofsymfony/user-bundle": "2.0.x-dev",
"friendsofsymfony/oauth-server-bundle": "^1.5",
"stof/doctrine-extensions-bundle": "^1.2",
"scheb/two-factor-bundle": "~2.0",

View file

@ -48,7 +48,7 @@ class UserRepository extends EntityRepository
{
return $this->createQueryBuilder('u')
->select('count(u)')
->andWhere('u.expired = false')
->andWhere('u.enabled = true')
->getQuery()
->getSingleScalarResult();
}

View file

@ -592,13 +592,13 @@ class ConfigControllerTest extends WallabagCoreTestCase
$user = $em
->getRepository('WallabagUserBundle:User')
->findOneByUsername('empty');
$user->setExpired(1);
$user->setEnabled(false);
$em->persist($user);
$user = $em
->getRepository('WallabagUserBundle:User')
->findOneByUsername('bob');
$user->setExpired(1);
$user->setEnabled(false);
$em->persist($user);
$em->flush();
@ -614,13 +614,13 @@ class ConfigControllerTest extends WallabagCoreTestCase
$user = $em
->getRepository('WallabagUserBundle:User')
->findOneByUsername('empty');
$user->setExpired(0);
$user->setEnabled(true);
$em->persist($user);
$user = $em
->getRepository('WallabagUserBundle:User')
->findOneByUsername('bob');
$user->setExpired(0);
$user->setEnabled(true);
$em->persist($user);
$em->flush();