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.

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.

Features include:

  • Users can be stored via Doctrine ORM, MongoDB/CouchDB ODM or Propel
  • Registration support, with an optional confirmation email
  • Password reset support
  • Unit tested
2611 questions
12
votes
3 answers

Simple API Key Authentication in Symfony2 using FOSUserBundle (and HWIOauthBundle), filling in the gaps

Edit: See below for my own solution, which is, at the time of writing, functioning but imperfect. Would love some criticism and feedback, if I get something put together that I feel is really solid then I'll make a howto blog post for other people…
Pez
  • 1,251
  • 16
  • 32
12
votes
2 answers

Overriding FOSUserBundle Login Form

Im following the documentation here:https://github.com/FriendsOfSymfony/FOSUserBundle/blob/master/Resources/doc/overriding_templates.rst I chose to Create A Child Bundle And Override Template so in my bundle I have class MyBundle extends Bundle { …
Joe Riggs
  • 1,312
  • 4
  • 23
  • 48
12
votes
5 answers

FOSUserBundle : Redirect the user after register with EventListener

I want to redirect the user to another form just after registration, before he could access to anything on my website (like in https://github.com/FriendsOfSymfony/FOSUserBundle/issues/387). So I create an eventListener like in the doc :…
user2178964
  • 124
  • 6
  • 16
  • 40
12
votes
2 answers

How to force password change using FOSUserBundle?

I'm attempting to implement a security feature in a Symfony 2.1 project where the admin can create a user with an initial password, and then when the user logs in the first time the change-password handler is fired automatically. I'm running into…
David
  • 371
  • 2
  • 9
12
votes
2 answers

Symfony2 - Tests with FOSUserBundle

i would write a test for Symfony2 with FOSUserBundle. At the moment i tried some ways and no one works. I need a function like "createAuthClient". Here is my basic class. I post it because you could understand my problem better.
PatrickB
  • 3,225
  • 5
  • 31
  • 55
12
votes
2 answers

How to overwrite FOS user bundle form labels

I have a hard time overwriting labels that the FOS user bundle for Symfony2 uses. I'm already overwriting the Form class, but there is no option for elements like "setOption", only getters. I could just remove an element and than add it again with…
Bartosz Rychlicki
  • 1,918
  • 3
  • 20
  • 41
12
votes
1 answer

Unable to work with FOSRestBundle

I am trying to use Symfony2 and FOSRestBundle to come up with a REST framework and I am failing miserably. I have done the following: in my deps file: [FOSRest] git=git://github.com/FriendsOfSymfony/FOSRest.git …
Strong Like Bull
  • 11,155
  • 36
  • 98
  • 169
11
votes
3 answers

FOSUserBundle: Remove unique index for emailCanonical

I am trying to remove the unique index on emailCanonical, so that multiple users can share the same email address. However, I do not want to edit FOS/UserBundle/Resources/config/doctrine/User.orm.xml directly as any updates to the bundle itself will…
Otto Yiu
  • 265
  • 1
  • 4
  • 13
11
votes
1 answer

Unrecognized option "csrf_provider" under "security.firewalls.main.form_login" despite csrf enabled

After setting up the FOSUser Bundle I have experienced this error Unrecognized option "csrf_provider" under "security.firewalls.main.form_login" Now I know how to use google and the two main things that could cause the problem are Not enabling…
aln447
  • 981
  • 2
  • 15
  • 44
11
votes
2 answers

Symfony 2 FOS User Bundle Bootstrap modal AJAX Login

Has anyone already built a login form inside a Bootstrap modal with Symfony 2 and FOS User Bundle ? Here is what I have now : src/Webibli/UserBundle/Resources/config/service.yml authentication_handler: class: …
Valentin
  • 503
  • 1
  • 3
  • 15
11
votes
1 answer

How to override FOSUserBundle's EmailConfirmationListener

I activated user confirmation for FOSUserBundle. But I don't want to take the response from the original listener $url = $this->router->generate('fos_user_registration_check_email'); $event->setResponse(new RedirectResponse($url)); I want to chose…
Gottlieb Notschnabel
  • 9,408
  • 18
  • 74
  • 116
10
votes
2 answers

FOSUserBundle password validation

I'm attempting to override the current validation for passwords in FOSUserBundle. I've tried a few options, but I still can't find the solution. To increase the password's MinLength, I created a validation.yml with: #…
MadManMonty
  • 816
  • 1
  • 7
  • 25
10
votes
4 answers

FOSUserBundle and remember me

I'm using a FOSUserBundle for authentication in Symfony2. Everything works fine except "remember me". My security.yml looks like this: security: providers: fos_userbundle: id: fos_user.user_manager encoders: …
repincln
  • 2,029
  • 5
  • 24
  • 34
10
votes
1 answer

Cannot autowire service

I am trying to implement UserManager from FOSUserBundle (Symfony3.4). Service/Register.php
Monolite
  • 101
  • 1
  • 1
  • 4
10
votes
2 answers

Symfony2 FosuserBundle: RE-send registration confirmation email

Framework PHP: Symfony2.6 Problem: I would like to add the following functionality to FosUserBundle: "The admin can re-send the registration confirmation email to a specific user" (in the admin section of the website). I've already built the "user…
Igor Carmagna
  • 957
  • 1
  • 10
  • 34