Closed MyriamTK closed 1 year ago
The plugin has a configuration file that you missed.
Actually, this might be a regression since 1.6.2 (d1d29e7c77a39a).
I hope this patch fixes the issue:
--- a/program/lib/Roundcube/rcube_ldap.php
+++ b/program/lib/Roundcube/rcube_ldap.php
@@ -914,20 +914,18 @@ class rcube_ldap extends rcube_addressbook
$attributes = [];
if ($fields == '*') {
- $attributes = (array) ($this->prop['search_fields'] ?? []);
+ $fields = (array) ($this->prop['search_fields'] ?? []);
// If search fields aren't configured use some common fields
- if (empty($search_fields)) {
+ if (empty($fields)) {
$fields = ['name', 'surname', 'firstname', 'email'];
}
}
// map address book fields into ldap attributes
- if (empty($attributes)) {
- foreach ((array) $fields as $field) {
- if (!empty($this->coltypes[$field]) && !empty($this->coltypes[$field]['attributes'])) {
- $attributes = array_merge($attributes, (array) $this->coltypes[$field]['attributes']);
- }
+ foreach ((array) $fields as $field) {
+ if (!empty($this->coltypes[$field]) && !empty($this->coltypes[$field]['attributes'])) {
+ $attributes = array_merge($attributes, (array) $this->coltypes[$field]['attributes']);
}
}
There's a confusion whether search_fields
should be LDAP attributes or fieldmap keys. Now both will work, but it might cause issues, so we might need some other change in the future.
Hello,
This fixes the problem perfectly!
Thanks for your help
Patch merged.
This fix leads to problems with new_user_identity in our environment.
With fix the filter searches using cn= which won't work, without the fix the filter uses uid= which is correct and succeeds (identical configuration).
Hello,
We're using roundcube version 1.6.4, and we're trying to set up the new_user_identity plugin. But it doesn't seem to work on our configuration. Authentication is via LDAP. We'd like to automatically populate new users with LDAP fields.
The directory is fully functional, and we can see all the user information.
However, when someone logs in for the first time, their settings are not configured in relation to ldap. His e-mail address is: login@domain.
Also, in the logs, when someone logs in for the first time, the ldap request is not correct. According to our configuration, it should be looking for an attribute called "supannAliasLogin" and not "uid". By default, it seems to me that the ldap request looks for the uid attribute (which doesn't exist for us).
Here's our config.inc.php :
And for the new_user_identity plugin conf :
The logs :
Thanks for your help!