Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

'search_fields' is not an array #9

Open
p-try opened this issue Dec 13, 2024 · 2 comments
Open

'search_fields' is not an array #9

p-try opened this issue Dec 13, 2024 · 2 comments
Assignees
Labels
bug Something isn't working

Comments

@p-try
Copy link

p-try commented Dec 13, 2024

Thank you very much for this very useful plugin! I have noticed that the configuration in the sample file does not work the way it is provided. This line is in config.inc.php.dist:

'search_fields' => ['mail', 'sAMAccountName'],

I wondered for some time why the plugin didn't work for me. Through Wireshark I found out that the LDAP search query always only searched the cn attribute instead of the provided fields. It turned out that 'search_fields' is expected to be a string, not an array, in the Roundcube LDAP implementation. Once I changed it to

'search_fields' => 'sAMAccountName',

everything started working. I suggest changing the sample config accordingly.

@andreashaerter
Copy link
Contributor

Hey, thanks for the report! I indeed ran into the same problem in a new environment using other schemas and you saved me a lot of debugging time. Will prepare a fix within this week :) and I have to investigate why I came to the conclusion it should be possible to use an array here.

Maybe I wanted to create some loop and got interrupted...

@andreashaerter andreashaerter self-assigned this Dec 18, 2024
@andreashaerter andreashaerter added the bug Something isn't working label Dec 18, 2024
@andreashaerter
Copy link
Contributor

Seems to be related: roundcube/roundcubemail#9420

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants