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

chrisyates - September 10, 2009 - 22:27
Project:LDAP integration
Version:6.x-1.0-beta1
Component:Code
Category:feature request
Priority:normal
Assigned:chrisyates
Status:needs review
Description

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

#1

chrisyates - September 11, 2009 - 18:01
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
 
 

Drupal is a registered trademark of Dries Buytaert.