Log in and register in the database. Although now I have a problem that I can’t log in a second time.
"symfony/symfony": "2.1.*" "fr3d/ldap-bundle": "2.0.*@dev"
I saw similar results, but if "bindRequiresDn: true" I get in my logs:
[2013-07-10 11:37:18] ldap_driver.DEBUG: ldap_bind (Nikita, **) [] []
[2013-07-10 11:37:18] ldap_driver.DEBUG: 0x1: Failed to get the DN for the account: Nikita [binding requires a username in the form of DN] [] []
and cannot enter.
But if I change:
... / seller / Fr3d / LDAP bundle / Fr3d / LdapBundle / Driver / ZendLdapDriver.php
if ($user instanceof LdapUserInterface && $user->getDn()) { $bind_rdn = $user->getDn(); } else { $bind_rdn = $user->getUsername(); }
about
if ($user instanceof LdapUserInterface) { $bind_rdn = $user->getDn(); } else { $bind_rdn = $user->getUsername(); }
everything works well.
My configuration
fr3d_ldap: driver: host: "%ldap_host%" port: "%ldap_port%" username: "%ldap_username%" password: "%ldap_password%" baseDn: ou=hello, dc=h, dc=i, dc=ru bindRequiresDn: true accountFilterFormat: (&(samaccountname=%s)) user: baseDn: ou=hello, dc=h, dc=i, dc=ru filter: (&(objectClass=user)) attributes: - { ldap_attr: samaccountname, user_method: setUsername }
source share