By aamin on
Hi,
I need to obtain all the values entered by the user during registration. I can obtain the account information like name and email address entered using $edit['name'] and $edit['mail'] but I cannot obtain profile values (profile module) since at the time of registration these values are not yet stored in the database therefore I cannot use $account->profile_city etc.
If anyone can tell me how can I obtain the profile values from registration form I ll appreciate it.
Thanks.
Moved by VM
Comments
bump
The easiest way is to programatically alter the registration form with hook_form_alter and then use the fields created. Another way might be setting your module to have less weight than profile core module, but I really don't know the implications of it. The explanation is below:
I went through profile core module (drupal 6) and found this line:
so fields are deleted there. If profile module takes precedence over your module, and thus invoke hook_user first, it deletes $edit[$field->name] before your module can read it. Maybe if you can invoke hooke_user first, those field are still available.
I don't know, its a wild guess.
I'm still trying to figure out how does an user registration process takes place. user core module is a bit confusing, specially if you're an amateur programmer like me.