带有symfony2的Fr3D LDAP BUNDLE

时间:2012-08-13 05:07:01

标签: symfony ldap openldap fr3dldapbundle

我已将FOS BUndle和Fr3d Bundle与symfony2集成在一起。这是我遇到的错误

  

MappingException:找不到名为'Acme.UserBundle.Entity.User.php'的类'Acme \ UserBundle \ Entity \ User'的映射文件。

这是我的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

请帮帮我

1 个答案:

答案 0 :(得分:2)

config.yml,您需要更新user_class下的fos_user设置...

fos_user:
    user_class: YourVendorName\UserBundle\Entity\User

确保user_class属性指向用户捆绑中的有效实体(显然确保您拥有UserBundle