Open f1-outsourcing opened 1 year ago
Ok tested with 1 record now something is changing. So having multiple search results makes this plugin fail. I would say that is bad, because this is the responsibility of the user to make sure he formats correct ldap filters. Besides that it is perfectly normal to have multiple results.
Plugin does not seem to set the organization field
For allowing multiple results:
38 if (count($results->records) >= 1) {
I tried adding organization with this, but I don't really see where this identity is being set when the user is created
41 $user_email = is_array($user['email']) ? $user['email'][0] : $user['email'];
42 $user_organization = is_array($user['organization']) ? $user['organization'][0] : $user['organization'];
43
44 $args['user_name'] = $user_name;
45 $args['email_list'] = [''];
46 $args['organization'] = $user_organization;
For the organization to be set this file needs to be patched
program/lib/Roundcube/rcube_user.php
674 $user_email = $data['user_email'];
675 $email_list = $data['email_list'];
676 $organization = $data['organization'];
and here
712 $record['user_id'] = $user_id;
713 $record['standard'] = $standard;
714 $record['organization'] = $organization;
Detecting the multiple identities, email addresses still fails though
Having multiple LDAP records for the same user is not supported scenario.
I suppose we could add support for organization attribute.
What about getting just the first retrieved result as identity, that is better than nothing.
I have no idea how this plugin should work, or where this is described. I assume this puts entries in the 'identities' table? The ldap log shows it found the 2 records, yet nothing is put in the 'identities' table.
I would assume that putting this to true, would show me something in the ldap log every time I log in, but that also does not happen. I only get the query when I delete from the users table.
I can't believe this is still not working easily out-of-the-box.
Roundcube Webmail 1.6.2, new_user_identity 1.2