Download & Extend

Multi-value profile field patch for 6.x-1.x

Project:LDAP integration
Version:6.x-1.0-beta2
Component:Code
Category:feature request
Priority:normal
Assigned:Unassigned
Status:reviewed & tested by the community

Issue Summary

This patch allows profile fields of type "selection" to be managed with ldapdata.module.

Our requirement was to have a multi-value LDAP attribute that is partially manageable from Drupal- i.e. it could contain a number of values, but Drupal could only modify a subset of those.

To use,

  1. Create a profile field of type "selection". Preferably use Profile Checkboxes to render the options as checkboxes rather than a <select>.
  2. Add options you wish Drupal to manage to this field. Other values will not be modified.
  3. In LDAP Data configuration, link the new profile field to the LDAP field you wish to manage.

Now the user should be able to add or delete the values you set in step 2 via their profile page. Other values, such as those set by an LDAP administrator, will not be modified, though they will be shown. We are using this for mailing list subscription management, where the user can only opt in/out of only certain lists.

Tested with D6.13

AttachmentSize
multivalue.patch3.99 KB

Comments

#1

Version:6.x-1.x-dev» 6.x-1.0-beta1

Corrected a number of problems, and I'm patching 6.x-1.0-beta1 to avoid some other issues.

AttachmentSize
multivalue_profile.patch 3.59 KB

#2

Version:6.x-1.0-beta1» 6.x-1.0-beta2
Assigned to:chrisyates» Anonymous

I've verified that this patch works as-is with 6.x-1.0-beta2. I've also tested with Drupal 6.15 and the latest version of profile_checkboxes.

Would be great to get a maintainer to include this.

Thanks!
-c

#3

Status:needs review» reviewed & tested by the community

Works great for me. I am changing the status to "reviewed and tested". Please add this functionality to 6.x-1.0-beta3.

Note: It does clash with #171763: Handle profile.module 'date' field sync (both patches modify the same segment of code) but either can be patched by hand. It will be less of an issue once they are ported.