When I have ldapdata activated and have defined some additional LDAP attributes, I get an error on the user registration form:
warning: array_shift() [function.array-shift]: The argument should be an array in sites/all/modules/ldap_integration/ldapdata.module on line 459.

That's in the function _ldapdata_attribute_form($value, $info) in ldapdata.module. That method is called from ldapprov.module on line 683: _ldapdata_attribute_form($attribute, $data['ldap_'. $attribute], $attr_info)
The method call has too many parameters, it should be _ldapdata_attribute_form($attribute, $attr_info).

CommentFileSizeAuthor
#3 ldapprov_01.patch791 bytesbryan kennedy
ldapprov.patch837 bytesVolx
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

Volx’s picture

Status: Active » Needs review

Any comments?

diaspora’s picture

i get same error message any help?

bryan kennedy’s picture

Status: Needs review » Reviewed & tested by the community
Issue tags: +user registration
FileSize
791 bytes

I get this same error when I try to enable attributes from the LDAP data module through LDAP Provisioning.

The patch fixes the problem, but I'd suggest one more change. Currently @Volx's patch, and the original code if it worked, use the name of the LDAP attribute for the default form field value. This is almost never the correct value to enter into the form field on registration. For example, this would be like entering the word "telephone" for a user's telephone number.

So I'd suggest leaving the default value set to NULL. I've submitted a patch with that change and fixed on small spelling error in the comment above.

@disapora - Applying either of these patches (instructions) should fix your problem, until this code makes it into the module.

diaspora’s picture

thanks for the patch it works now but i have also different problem on ldap => data section i need those attribiute which i crate in data to be required and there is no option that required or not

Volx’s picture

@bryan
Thanks for your patch. I didn't look for a fix to that default attribute value problem yet, so it's great we can fix it in the same line :)