Just installed LDAP data with Profile module, new fields created under Profile are not being updated when doing Edit under My Account.

Debug trace found that under profile_save_profile(), the $edit values are save to {profile_values} and null'ed, before ldapdata_user_update_profile() get called.

function profile_save_profile(&$edit, &$user, $category, $register = FALSE) {
...
    $edit[$field->name] = NULL;
}

So ldapdata_user_update_profile() should grab the values from {profile_values} table instead of $edit. Attached patch solves the problem but incur additional queries, which could be improved.

The same problem could be happening in http://drupal.org/node/175419, but I do not have the environment to test for empty email.

CommentFileSizeAuthor
ldapdata-profile-update.patch1.78 KBckng

Comments

Waldemar’s picture

It might be easier to just set $edit = $_POST in ldapdata_user_update_profile. There might be some security implications in some situations.

dhruvahuja’s picture

I just changed the weight of ldapdata module to -1 . The profile module's weight was 0 . The ldapdata module behaves as expected now :)

Will this break several other things? :P

jrbeeman’s picture

I ran into this issue while setting up the module this evening. I tried Waldemar's suggestion of just using $edit = $_POST, which worked, but I believe the module weight change or the supplied patch may actually be better, but haven't tried either in the hope of getting the comments of a maintainer first.

johnbarclay’s picture

Status: Needs work » Closed (won't fix)

Closing 5.x issues to clean out issue queue.