6
首次登錄並註冊到數據庫中。雖然現在我遇到了我無法再登錄的問題。FOS和Fr3d ldap與symfony2.1捆綁
"symfony/symfony": "2.1.*"
"fr3d/ldap-bundle": "2.0.*@dev"
我也有類似的issies,但如果 「bindRequiresDn:真正的」 我得到了我的日誌:
[2013年7月10日11時37分18秒] ldap_driver.DEBUG:的ldap_bind(尼基塔,* *)[] []
[2013年7月10日11點37分十八秒] ldap_driver.DEBUG:爲0x1:無法檢索DN帳戶:尼基塔[裝訂方式需要用戶名DN格式] [ ] []
無法登錄。
但如果我改變:
... /供應商/ fr3d/LDAP束/ FR3D/LdapBundle /驅動器/ ZendLdapDriver.php
if ($user instanceof LdapUserInterface && $user->getDn()) {
$bind_rdn = $user->getDn();
} else {
$bind_rdn = $user->getUsername();
}
上
if ($user instanceof LdapUserInterface) {
$bind_rdn = $user->getDn();
} else {
$bind_rdn = $user->getUsername();
}
所有的作品都很好。
我的配置
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 }
問題在哪裏? – PokeRwOw