1

I am trying to use Fr3d LDAP bundle with Symfony2 to authenticate users before entering my site.

Unfortunately, I am unable to modify the schema to form the necessary user table required by FOS User Bundle. This leads me to trying to bypass the FOS User Bundle and just use the functionality in Fr3d LDAP bundle.

Does anyone have any information on how to do this? I've looked all over and haven't found anything.

rjhilgefort
  • 453
  • 4
  • 12
  • Sorry but I don't understand what is your problem. Why you need modify the schema? – Maks3w Jan 31 '13 at 20:34
  • The FOSUserBundle required that additional columns be added to the User class. I cannot add these columns, so I get DB errors when I attempt to login. I don't actually need to use any part of the FOSUserBundle, as I can hydrate the user object myself. Can the LDAP bundle be configured independently? – rjhilgefort Feb 01 '13 at 18:39
  • Yes, Just change service.user_manager with your own user manager. https://github.com/Maks3w/FR3DLdapBundle/blob/2.0.x/Resources/doc/index.md This is the interface that you should implement https://github.com/Maks3w/FR3DLdapBundle/blob/2.0.x/Model/UserManagerInterface.php – Maks3w Feb 01 '13 at 19:49
  • Thank you to you. If possible send a contribution to the project with a recipe. – Maks3w Feb 01 '13 at 21:17

1 Answers1

0

Yes, is possible use FR3DLdapBundle without FOSUserBundle.

Just change service.user_manager with your own user manager (https://github.com/Maks3w/FR3DLdapBundle/blob/2.0.x/Resources/doc/index.md)

This is the interface that you should implement https://github.com/Maks3w/FR3DLdapBundle/blob/2.0.x/Model/UserManagerInterface.php

*This is a copy of the comment Disconnect Fr3d LDAP bundle from FOS User Bundle *

Community
  • 1
  • 1
Maks3w
  • 6,014
  • 6
  • 37
  • 42
  • I'm not sure I understand completely where to place my new class, as well as the proper name space to reference it correctly in the proper yml file(s). They just have a short paragraph on this in their documentation. Can you provide any additional resources or help with this? https://github.com/FriendsOfSymfony/FOSUserBundle/blob/master/Resources/doc/user_manager.md – rjhilgefort Feb 04 '13 at 19:23
  • Forgive FOS. You need create a SF2 Service. Create your custom class in your own bundle and register it as a SF2 Service. http://symfony.com/doc/2.0/book/service_container.html – Maks3w Feb 04 '13 at 20:53
  • I'm still not making the quickest progress with in implementing this new UserManager class. How can I ensure that the login form only checks against LDAP, then fetches a user from my existing DB? Could you provide any examples or resources that show a little bit more. Thanks for your help. – rjhilgefort Feb 07 '13 at 16:56
  • I have made some headway, but I still have a couple issues. It seems that symfony2 is not using the FR3D LdapBundle security factory. I have configured it in the security.yml, but it is not checking the password via the methods laid out in LdapAuthentication. Any help? – rjhilgefort Feb 11 '13 at 21:33