Profile values for users are not saved in the profile_values table when a user is added; both when the account is created by a user or the admin. The profile_values is only populated when the profile form is resubmitted. One repercussion that occurs is that a user is not listed on the members list page until the profile form is resubmitted.
This seem to stem from http://drupal.org/node/102871 with the patch that removes adding new user checks and relies on the $register argument (TRUE or FALSE) passed to _profile_get_fields. It seems that there is no distinction when an account is inserted or updated.
Attached patch passed $register = TRUE to profile_save_profile on hook_user insert operation which in turn passes it to _profile_get_fields. Also changed profile_save_profile to reflect the additional $register parameter. Tested with creating new account by user and by admin; the profile_values table is populated. Updating profile values works as usual.
| Comment | File | Size | Author |
|---|---|---|---|
| add_user_save_profile.patch | 1.22 KB | edmund.kwok |
Comments
Comment #1
drummCan't reproduce in 5.x.
Comment #2
ekrispin commentedWe have the exact problem in 5.1. I am surprised that no one encountered this problem since this post was issued.
While the patch takes care of future registered users, I wonder how could we propagate the fields of all the already registered users.