Questions tagged [fosuserbundle]
The FOSUserBundle adds support for a database-backed user system in Symfony2. It provides a flexible framework for user management that aims to handle common tasks such as user registration and password retrieval.
2,614
questions
2
votes
0
answers
26
views
Migrate Symfony from FOSUserBundle to Security
I have an old project written in Symfony 3.4 where I used FOSUserBundle for authenticating users.
Recently I started to upgrade the project to Symfony 6 - quite a long journey where I actually created ...
0
votes
0
answers
26
views
User manager error while HWIOAuthBundel Integartion with FOSUSerBundle
Could not find the manager name parameter in the container. Tried the following parameter names: "fos_user.model_manager_name", "doctrine.default_entity_manager".
0
votes
0
answers
31
views
Symfony 2 CSRF issue
I'm having a trouble with a legacy Symfony application:
The application has been deployed 2 years ago.
The application was working perfectly until two days ago. Now, every user that try log in get ...
0
votes
1
answer
130
views
Symfony 3.4 - Dependency Injection for ResettingController of FosUserBundle work only in dev env
My initial problem is this error:
Too few arguments to function
FOS\UserBundle\Controller\ResettingController::__construct(), 0 passed
in
/var/www/project/vendor/symfony/symfony/src/Symfony/Component/...
0
votes
0
answers
62
views
Symfony: Rest Controller getUser() null
I just updated my symfony app from 4.2.8 to 4.4.37. The app uses the fos user bundle as well as the fos rest bundle. Started the Project with Symfony 2.
After the Update, i cant get the user with $...
0
votes
1
answer
45
views
Symfony 4/JMS/FOSUser: Can't serialize datas from FOS\UserBundle
There is A LOT of similar quesions, some of them have validated answers, but here I am and none of them worked.
My use case is pretty simple:
My users App\Client\common\Entities\User belong to a ...
0
votes
0
answers
340
views
symfony 4.4 sonata admin and sonata user compatible issue
I tried to install symfony 4.4 instead. after the installation, I tried to install sonata user bundle and got this error:
The child node "db_driver" at path "fos_user" must be ...
0
votes
1
answer
45
views
FOSUserBundle - Update email address and email canonical not working
After creating a user I want to make functionality to update email/ canonical email of the other accounts. I'm trying to update using:
$user = $this->fosUserManager->findUserBy(["id" =&...
0
votes
1
answer
545
views
Argument #1 ($userProvider) must be of type ... UserProviderInterface
I have installed the Sonata User Bundle using the instructions. The process of loading user fixtures and clearing the cache work fine, but once I try to access an area requiring authentication in the ...
-2
votes
1
answer
550
views
Cannot serialize Symfony\Component\Cache\Adapter\AbstractAdapter
I removed FosUserBundle and develop my own User module. Since then i have this error that popsup when i try to serialize the session.
$session->set($this->sessionKey, serialize($token));
EDIT : ...
-1
votes
1
answer
64
views
security.context service is missing in a Symfony3 app
I inherited a Symfony 3 application that appears to have a good, working installation of FOSUserBundle. However, when I try to inject @security.context into a service in order to retrieve the logged-...
0
votes
0
answers
66
views
Return custom error message when user not enabled
I have been creating a web application using Symfony(FosUsersBundle) & Angular, when the user types false login informations, even when the user not enabled I always the the same response:
{code: ...
0
votes
0
answers
122
views
Getting anon when trying to get loogged in user [Symfony 3.4] FOSUserBundke+Lexik+FosRest
I'm new in symfony and tried to implement a auth service that allows me to register+login+getting the logged in user for my angular app.
the login worked like a charm, got the token and connected ...
0
votes
2
answers
571
views
Symfony 4: ROLE_USER doesn't inherit IS_AUTHENTICATED_FULLY and Voter throws AccessDeniedException
I'm working on a legacy project with a lot of ancient staffs. There're huge numbers of actions which are used really rare. Half a year ago we upgraded from Symfony 2.8 to Symfony 4.4. All worked ...
1
vote
1
answer
216
views
Symfony fos:user:create through error "could not find driver", (Xampp with multiple verison of PHP)
INTRODUCTION:
I am in a Symfony Project with PHPStorm. I'm trying to create a fos user on DB (xampp MySQL).
Symfony CLI version v4.21.6
Composer version 1.10.19
C:\Program Files\Symfony\...
0
votes
0
answers
272
views
How to get the file Doctrine\Common\Persistence\ObjectManager
I have a project on Symfony 4.4 and I use a bundle that needs this ObjectManager. The thing is, the namespace used in the vendor in FOSUser indicates that it needs Doctrine\Common\Persistence\...
2
votes
2
answers
719
views
Error on FOSUserBundle, argument passed must be an instance of ObjectManager
I've seen all the posts about this subject but nothing has helped me. I think my problem is slightly different. I use FOSUser bundle on a Symfony 4 project. When I access my website I get this error:
...
0
votes
0
answers
125
views
Symfony 4 Mailer [ gmail ] takes too long
I recently implemented implemented fos/user-bundle, the user can only connect to the website only if he receives a confirmation mail.
So I implemented the mail mailing like below in the env file
...
0
votes
1
answer
721
views
Symfony 4.4 Error on FOSUserBundle : UserManager
I had a bug with symfony, I had to reinstall my vendor folder and since then I have a bug that I cannot fix.
Argument 3 passed to FOS\UserBundle\Doctrine\UserManager::__construct() must be an ...
7
votes
1
answer
3k
views
FOS UserBundle UserManager::__construct() must be an instance of ObjectManager
Fresh installation of symfony 4.4, then symfony flex and some common recipes, then I was trying to setup fos userbundle, I have this issue I cannot get around.
Argument 3 passed to FOS\UserBundle\...
3
votes
2
answers
2k
views
Symfony 4.4 Error on FOSUserBundle Installation
I followed this two post about "how to install fosuserbundle in symfony 4.4":
https://vfac.fr/blog/how-install-fosuserbundle-with-symfony-4
https://ourcodeworld.com/articles/read/794/how-to-...
0
votes
1
answer
163
views
Symfony Manually Log User In
A page exists where a user entity is created (this is outside of the normal registration flow).
When the user is created they should be logged in, a guardHandler is used with an authenticator as shown ...
0
votes
1
answer
40
views
How to override Login Form for FOSUserBundle
I'm trying to override the login form of FOSUserBundle. I've seen on the web that you have to create new folders. So here's my project:
Intranet
|___ templates
|___ ApplicationFOSUserBundle
...
0
votes
1
answer
45
views
Unable to override and use FOS Registration form
I've overrided the FOS RegistrationFormType like this
<?php
namespace AdminBundle\Form;
use Symfony\Component\Form\AbstractType;
use Symfony\Component\Form\FormBuilderInterface;
use Symfony\...
1
vote
1
answer
210
views
Symfony 4: FOSUserBundle : Override Controller
I want to separate the admin login page and user login page. I did it this way with the codes I got from some sources, but I get an error.
// config/security.yaml
security:
# https://symfony.com/...
4
votes
1
answer
1k
views
How use a custom function Twig-symfony
We have a Symfony 3.4 project with twig templates and authentication system by FOSUserBundle.
It is multi-domain and manages customer and supplier data mainly works well but now I have a problem that ...
0
votes
1
answer
41
views
FOSRestBundle FormType convert JsonArray to ArrayCollection
Hello im currently creating a Rest Api and I want to receive something like this:
{"collection": [1,2,3]}
I have come up with something like this:
public function postDTOAction(Request $...
2
votes
1
answer
343
views
Symfony 4.4 FOS user-bundle api/auth/login Call to a member function findOneBy() on null
I'm using symfony 4.4 via docker and installed FOS user bundle some time ago. Everything was working fine but recently while trying to login, i keep getting the error
Call to a member function ...
1
vote
1
answer
462
views
Export user roles with Sonata admin
I'm using SonataAdmin and FosUserBundle with Symfony 4.
I want to use the export feature to export whole users' data in CSV, JSON ...
When a trigger the export, the roles column in the file is empty ...
0
votes
0
answers
58
views
FOSUser did not encrypt Password Symfony 4
I have FOSUser installed on a Symfony project. When I want to create a user, it works but the passwords are not encrypted in the database.
My User extends BaseUser as mentioned in the doc. My forms ...
1
vote
1
answer
147
views
Disable CSRF when registering by a post method a new user in FOSUserBundle
I'm looking to combine a post rest method and FOSUserBundle to my symfony 3 application to register new user, so the problem is that when i use to post a new user I got this error Bad Request with &...
1
vote
1
answer
112
views
Trying to insert data ManyToOne FOSRestBundle
I'm trying to creating an API REST with the bundle FOSRestBundle (SF5).
I've an entity "Categorie" which can have an parent "Categorie".
Here is the entity :
<?php
namespace App\Entity\Main;
use ...
-2
votes
1
answer
271
views
Symfony on Apache rewrites /login path to /web/login
I'm trying to set up a Symfony 3.4 project on an Apache (2.4.25) server. However, I'm facing issues with the rooting.
The application works smoothly with the built-in server (all routes). However, on ...
0
votes
0
answers
120
views
Symfony 3.4: problem with POST http method Rest
I use following libraries: JMSSerializer, FOSUserBundle FOSRestBundle + Symfony 3.4 + PHP 5
My need is to add an order to an unregistered customer( the user choose the offer and enter his info in form ...
0
votes
2
answers
30
views
FOSUserBundle keeps saving passwords as plaintext
I have installed FOSUserBundle in a Symfony 3.4 app, with the goal of eventually using it with LexikJWTAuthenticationBundle to create an API. My security.yml file looks like this:
security:
...
1
vote
0
answers
835
views
Symfony 4 and fos user bundle not working
I'm new to Symfony. I've installed version 4 and fos user bundle 2.0. I want to override the default registration type and i added my own validations on fields but they are not considered. I tried to ...
0
votes
1
answer
29
views
Change the FOS users connection property
I have a problem with the connection with the friends of symfony and jwt bundle, by default it uses the username to connect only I need to use email.
I first try to change the property in secutiy....
1
vote
0
answers
111
views
Using Symfony/FOSUserBundle, how can I redirect Locked users to a page other than the login form?
I have an existing system using Symfony 3.4 and FOSUserBundle 2.1.2. We have a concept of a Locked User (originally in FOSUserBundle but since that was removed now in our own bundle). Symfony core ...
1
vote
2
answers
1k
views
FOSUserBundle and Symfony 4.4.2 (lts) Problem
I am trying to create clean new project using newest lts version of Symfony and I have this problem installing FOSUserBundle:
https://pastebin.com/bYYdY40E
I don't get it, why this simple config ...
0
votes
0
answers
23
views
FOSUser : templates are not showing CSS after deployment SF4
My CSS is not displayed on my FOSUser template after deployment. In local, everything's fine.
I followed the documention of FOSUser and I don't understand what's going on.
'Could you help me please ?'...
0
votes
0
answers
167
views
FOSUserBundle registration form in Symfony 4.3
I'm trying to setup my FOSUserBundle 2.0 for Symfony 4.3 following this documentation: https://symfony.com/doc/2.1/bundles/FOSUserBundle/index.html
I created a new member class that extends FOSUser ...
0
votes
1
answer
106
views
Redirect user after verifying that he is connected with Symfony 4 and FOSUserBundle
Hello world !
I am a laravel developer but for a while I have been working on symfony projects.
And in my work I have just been faced with a major problem that is running a piece of code after ...
0
votes
1
answer
467
views
How to reference mailer component of symfony 4.3 with FOSUserBundle
I would like to send my FOSUserBundle emails via the Symfony's new mailer component.
Given these instructions, I need to create a service that implements the FOSUserBundle MailerInterface. Thus I ...
0
votes
1
answer
44
views
Problem redirect after login when using FOSUser Symfony4
http://blog.test/register and http://blog.test/login works well, so when I access from http://blog.test/admin I am redirected to http://blog.test/login and
and when I log in i have this error : ...
-1
votes
1
answer
1k
views
Symfony - extension able to load the configuration
I am trying to install FOSUserBundle based on a documentation.
I have created fos_user.yaml file in conifig/packages path with:
fos_user:
db_driver: orm
firewall_name: main
user_class: bundles\App\...
0
votes
1
answer
33
views
How to add role to group using constructor
I've been tried to set role to every group while they are creating. I thought using __constructor will be good idea, but it doesn't work, ROLE_ADMIN isn't in new groups. I don't know what I'm doing ...
0
votes
1
answer
630
views
You have requested a non-existent service "fos_user.manager"
I use symfony 4.1.13 and FOSUser v2.1.2
I got this error when I try to clear cache.
You have requested a non-existent service "fos_user.manager".
Here is my controller function
/**
* Create New ...
0
votes
0
answers
189
views
Add custom property to FOS user, based on username
In a Symfony 3.4 application, I have a Entity\User that extends FOS\UserBundle\Model\User. I have some custom properties that are added to the database when a new user is registered, like so:
/**
...
0
votes
0
answers
375
views
Security login with Sonata and FosUser
If I follow this documentation: https://symfony.com/doc/master/bundles/SonataAdminBundle/reference/security.html#user-list-customization
I have the error
Argument 1 passed to Symfony\Component\...
5
votes
1
answer
9k
views
Could not resolve argument $token on override FOS Controller in symfony 4.3
Firstly, I tried all the questions & answers related to this topic. Additionally and I tried related questions and try to solve it but no success. So please read my question thoroughly.
I want to ...