Search code examples
symfonyldapfr3dldapbundle

Ldap configuration for FR3LdapBundle


I configured FR3DLdapBundle.

I have to modify app/config/config.yml

# app/config/config.yml
fr3d_ldap:
 client:
    host:         192.168.1.101
    username:     cn=admin,dc=test,dc=local
    password:     12345
    optReferrals: false

    baseDn: dc=test, dc=local
    filter: (&(ObjectClass=*))
    attributes:
       - { ldap_attr: mail,  user_method: setUserName }

But it is not working. Adding the phpldapadmin screenshot.

enter image description here

Is the configuration right? what is the " user_method: setUserName" ?


Solution

  • attributes:
           - { ldap_attr: mail,  user_method: setUserName }
    

    Means LDAP Attribute "mail" will be passed as argument to the method "setUserName" of your User class

    attribute mail seems to don't exists accord your screenshot.

    Did you modified the security.yml too?