LDAP Search error when authenticating and identifying on two LDAP (AD) with Multi modules
I have 2 Active Directories to authenticate and identify users : ADE and ADI.
In LemonLDAP I configured lemonldap-ng.ini adding the key "Multi" with my two AD attributes LDAP#ADI and LDAP#ADE.
In Manager interface I configured auth module in "Multiple" mode with the string "LDAP#ADI;LDAP#ADE".
The same way, I configured the userdb module (but from the interface another bug appears with the message "bad module name" when saving, so I configured it directly by hand in lmConf-n).
Then, when I am connecting with a user from ADI, it works. But when I try to connect with a user from ADE, it fails. Nevertheless, if I change the order of my AD : "Multi LDAP#ADE;LDAP#ADI" instead of "Multi LDAP#ADI;LDAP#ADE" then when I try to connect with a user from ADE it works but not with one from ADI. Logical !
I tried to find the answer in the application classes but didn't succeed.
Attached, a log with the error from ldap search in UserDBLDAP.pm line 80.
I think it's because when application switch to the second AD, the ldap object used in UserDBLDAP search method is not well re-initialised with ADE attributes (it keeps some attributes from ADI conf).
It's just a hypothesis, and I am really interested if you could find the issue !