Ability to store custom attributes in LDAP

Nr. 18 - May 19, 2009 - 15:40
Project:LDAP provisioning
Version:6.x-1.0-beta1
Component:Code
Category:feature request
Priority:normal
Assigned:Unassigned
Status:active
Issue tags:custom fields
Description

The ability to store the defined custom fields in: ldapprov.conf.inc into the ldap using the "Basic LDAP attributes:" template

ldapprov.module Line #1588

  //Add Support for storring the custom fields into ldap
  foreach(ldapprov_custom_elements() as $field_name => $field) {
    $ldap_vars['!'.$field_name] = $data['custom_'.$field_name];
  }

I fixed it like this for the time being but is it possible to integrate this into the module or is there some other way to do this?

#1

miglius - May 21, 2009 - 11:54

There is no ldapprov.conf.inc file any more in the dev version. Custom fields are configurable from the module settings page.

#2

Matt V. - September 3, 2009 - 15:23

Can someone provide a bit more detail on how to add custom fields? For backwards compatibility reasons, I need to add a custom salted password field to LDAP that users should not see or be able to edit. I need the salted password to be stored when a user gets created and updated if a user changes their password. I have a handle on getting the password and salting it the way I need it, but I'm not sure how/where I go about adding it to LDAP.

#3

Nr. 18 - October 1, 2009 - 09:34
Version:6.x-1.0-alpha2» 6.x-1.0-beta1

In the 6.x.-1.0-beta1 release you goto: /admin/settings/ldap/ldapprov

There you will find a fieldset: "Registration form" with "Custom elements" there you can add a custom field to the registration form:

sponsor|type=>textfield|title=>Sponsor POC|weigth=>4|size=>64|maxlemgth=>64|required=>1|description=>Sponsor Point of Contact.

And than you add the following to the "LDAP attributes"

<ldapattribute_name>: !custom_sponsor

As you can see the field called !custom_<custom name>

 
 

Drupal is a registered trademark of Dries Buytaert.