mirror of
https://github.com/wallabag/wallabag.git
synced 2024-11-26 19:11:07 +00:00
Re-use FOSUser master branch
This commit is contained in:
parent
4da598c5df
commit
5066c3e066
4 changed files with 9 additions and 8 deletions
|
@ -210,6 +210,7 @@ fos_user:
|
||||||
from_email:
|
from_email:
|
||||||
address: "%from_email%"
|
address: "%from_email%"
|
||||||
sender_name: wallabag
|
sender_name: wallabag
|
||||||
|
|
||||||
fos_oauth_server:
|
fos_oauth_server:
|
||||||
db_driver: orm
|
db_driver: orm
|
||||||
client_class: Wallabag\ApiBundle\Entity\Client
|
client_class: Wallabag\ApiBundle\Entity\Client
|
||||||
|
@ -217,10 +218,10 @@ fos_oauth_server:
|
||||||
refresh_token_class: Wallabag\ApiBundle\Entity\RefreshToken
|
refresh_token_class: Wallabag\ApiBundle\Entity\RefreshToken
|
||||||
auth_code_class: Wallabag\ApiBundle\Entity\AuthCode
|
auth_code_class: Wallabag\ApiBundle\Entity\AuthCode
|
||||||
service:
|
service:
|
||||||
user_provider: fos_user.user_manager
|
user_provider: fos_user.user_provider.username_email
|
||||||
options:
|
options:
|
||||||
refresh_token_lifetime: 1209600
|
refresh_token_lifetime: 1209600
|
||||||
|
|
||||||
scheb_two_factor:
|
scheb_two_factor:
|
||||||
trusted_computer:
|
trusted_computer:
|
||||||
enabled: true
|
enabled: true
|
||||||
|
|
|
@ -65,7 +65,7 @@
|
||||||
"liip/theme-bundle": "~1.1",
|
"liip/theme-bundle": "~1.1",
|
||||||
"lexik/form-filter-bundle": "~5.0",
|
"lexik/form-filter-bundle": "~5.0",
|
||||||
"j0k3r/graby": "~1.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",
|
"friendsofsymfony/oauth-server-bundle": "^1.5",
|
||||||
"stof/doctrine-extensions-bundle": "^1.2",
|
"stof/doctrine-extensions-bundle": "^1.2",
|
||||||
"scheb/two-factor-bundle": "~2.0",
|
"scheb/two-factor-bundle": "~2.0",
|
||||||
|
|
|
@ -48,7 +48,7 @@ class UserRepository extends EntityRepository
|
||||||
{
|
{
|
||||||
return $this->createQueryBuilder('u')
|
return $this->createQueryBuilder('u')
|
||||||
->select('count(u)')
|
->select('count(u)')
|
||||||
->andWhere('u.expired = false')
|
->andWhere('u.enabled = true')
|
||||||
->getQuery()
|
->getQuery()
|
||||||
->getSingleScalarResult();
|
->getSingleScalarResult();
|
||||||
}
|
}
|
||||||
|
|
|
@ -592,13 +592,13 @@ class ConfigControllerTest extends WallabagCoreTestCase
|
||||||
$user = $em
|
$user = $em
|
||||||
->getRepository('WallabagUserBundle:User')
|
->getRepository('WallabagUserBundle:User')
|
||||||
->findOneByUsername('empty');
|
->findOneByUsername('empty');
|
||||||
$user->setExpired(1);
|
$user->setEnabled(false);
|
||||||
$em->persist($user);
|
$em->persist($user);
|
||||||
|
|
||||||
$user = $em
|
$user = $em
|
||||||
->getRepository('WallabagUserBundle:User')
|
->getRepository('WallabagUserBundle:User')
|
||||||
->findOneByUsername('bob');
|
->findOneByUsername('bob');
|
||||||
$user->setExpired(1);
|
$user->setEnabled(false);
|
||||||
$em->persist($user);
|
$em->persist($user);
|
||||||
|
|
||||||
$em->flush();
|
$em->flush();
|
||||||
|
@ -614,13 +614,13 @@ class ConfigControllerTest extends WallabagCoreTestCase
|
||||||
$user = $em
|
$user = $em
|
||||||
->getRepository('WallabagUserBundle:User')
|
->getRepository('WallabagUserBundle:User')
|
||||||
->findOneByUsername('empty');
|
->findOneByUsername('empty');
|
||||||
$user->setExpired(0);
|
$user->setEnabled(true);
|
||||||
$em->persist($user);
|
$em->persist($user);
|
||||||
|
|
||||||
$user = $em
|
$user = $em
|
||||||
->getRepository('WallabagUserBundle:User')
|
->getRepository('WallabagUserBundle:User')
|
||||||
->findOneByUsername('bob');
|
->findOneByUsername('bob');
|
||||||
$user->setExpired(0);
|
$user->setEnabled(true);
|
||||||
$em->persist($user);
|
$em->persist($user);
|
||||||
|
|
||||||
$em->flush();
|
$em->flush();
|
||||||
|
|
Loading…
Reference in a new issue