How to transfer data between 2 fields I have profile 2 installed. I added a new field called "maiden name" to my profile form using the "add existing field" option. I had previously created this field in the default user registration form.

Now I want to delete the field (maiden name) from the user registration form. Please how can I transfer the data/values to the new field in my profile 2 form.

Thank you.
This in untested code so you will need to adjust the paths to get the correct values however it shows the general approach to take:

$uids = db_query("SELECT uid FROM user WHERE status=1")-&gt;fetchCol();

foreach($uids as $uid) {
    $account = user_load($uid);
    $profile2 = profile2_load_by_user($account, 'profile_2_type_name_here');
    $profile2['maiden_name']-&gt;field_maiden_name[LANGUAGE_NONE][0]['value'] = $account-&gt;field_maiden_name[LANGUAGE_NONE][0]['value'];
    profile2_save($profile2);
}