symfonyldapopenldapfr3dldapbundle

Fr3D LDAP BUNDLE with symfony2


I have integrated FOS BUndle and Fr3d Bundle with symfony2. Here is the bug I have got

MappingException: No mapping file found named 'Acme.UserBundle.Entity.User.php' for class 'Acme\UserBundle\Entity\User'.

Here is my config.yml

fos_user:
    db_driver: orm # other valid values are 'mongodb', 'couchdb' and 'propel'
    firewall_name: main
    user_class: Acme\UserBundle\Entity\User

fr3d_ldap:
    client:

    user:
        baseDn: cn=admin, dc=test, dc=local
        filter: (&(ObjectClass=Person))
        attributes:          # Specify ldap attributes mapping [ldap attribute, user object method]

      service:
          user_manager: fos_user.user_manager          # Overrides default user manager
          ldap_manager: acme.ldap.ldap_manager # Overrides default ldap manager

Please help me


Solution

  • In your config.yml, you need to update your user_class setting under fos_user...

    fos_user:
        user_class: YourVendorName\UserBundle\Entity\User
    

    Make sure that the user_class property is pointing to a valid entity in your user bundle (and obviously make sure you have a UserBundle)