forked from wallabag/wallabag
Migrate getRepository with entities
This commit is contained in:
@ -17,6 +17,7 @@ use Wallabag\ImportBundle\Import\PinboardImport;
|
||||
use Wallabag\ImportBundle\Import\ReadabilityImport;
|
||||
use Wallabag\ImportBundle\Import\WallabagV1Import;
|
||||
use Wallabag\ImportBundle\Import\WallabagV2Import;
|
||||
use Wallabag\UserBundle\Entity\User;
|
||||
|
||||
class ImportCommand extends ContainerAwareCommand
|
||||
{
|
||||
@ -47,9 +48,9 @@ class ImportCommand extends ContainerAwareCommand
|
||||
$em->getConnection()->getConfiguration()->setSQLLogger(null);
|
||||
|
||||
if ($input->getOption('useUserId')) {
|
||||
$entityUser = $em->getRepository('WallabagUserBundle:User')->findOneById($input->getArgument('username'));
|
||||
$entityUser = $em->getRepository(User::class)->findOneById($input->getArgument('username'));
|
||||
} else {
|
||||
$entityUser = $em->getRepository('WallabagUserBundle:User')->findOneByUsername($input->getArgument('username'));
|
||||
$entityUser = $em->getRepository(User::class)->findOneByUsername($input->getArgument('username'));
|
||||
}
|
||||
|
||||
if (!\is_object($entityUser)) {
|
||||
|
||||
Reference in New Issue
Block a user