Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
The profile field mapping works with simple text fields, but not with fields with different LDAP syntax (eg. generalizedTime). Also, $ is not changed into \n for multi-line fields.
This could either be fixed by an optional mangling reg exp for each ldap profile field or preferably by checking the schema for the syntax and mangling accordingly.
Comment | File | Size | Author |
---|---|---|---|
#2 | ldap-data_type_mapping_for_profile_fields-1841514-2.patch | 1.25 KB | noahadler |
Comments
Comment #1
johnbarclay CreditAttribution: johnbarclay commentedI'm up for patches on this to tweak things. I believe to avoid a bunch of hacks that only work for specific fields and mess up the interface, one of the following approaches is best:
1. Leverage the functionality of feeds module. In the long run feeds module is the best way to deal with any complex fields because of tools like feeds tamper and processors already available for more complex fields like taxonomy fields.
2. Use the schema, entity, and field apis to do it well.
Comment #2
noahadler CreditAttribution: noahadler commentedHere's a small patch to populate taxonomies, because I needed that functionality. It doesn't follow one of the patterns you mentioned, but might be possible to generalize using the entities interface.
Comment #3
johnbarclay CreditAttribution: johnbarclay commentedI'm ok with this approach for some common field types. To be committed it would need UI documentation and test coverage. I'm trying to avoid adding incomplete features at this point because a release candidate is way overdue and the module is very feature rich with poor documentation and test coverage.
Comment #4
albert9000 CreditAttribution: albert9000 commented#2 patch worked for me and I'd love to see it committed. Since I don't think anything has been done towards that in the past few months I'm willing to take a stab at it.
If anyone thinks otherwise let me know.
Comment #5
vistree CreditAttribution: vistree commentedHi, patch in #2 is very interesting. How can this be expanded so we could map entity reference fields by node title??
In the moment, it is not possible to map a ldap-attribute holding the title of a node referenced through entityreference.
Comment #6
grahlComment #7
grahlThe patch looks fine and other users can of course make use of it, for inclusion in LDAP and upstream though it's not quite generic enough, thus I'm closing this issue. I'd recommend 7.x users to consider doing this in one of the ldap_user hooks.