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.
| Comment | File | Size | Author |
|---|---|---|---|
| ldapdata-profile-update.patch | 1.78 KB | ckng |
Comments
Comment #1
Waldemar commentedIt might be easier to just set $edit = $_POST in ldapdata_user_update_profile. There might be some security implications in some situations.
Comment #2
dhruvahuja commentedI 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
Comment #3
jrbeemanI 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.
Comment #4
johnbarclay commentedClosing 5.x issues to clean out issue queue.