Index: includes/bootstrap.inc =================================================================== RCS file: /cvs/drupal/drupal/includes/bootstrap.inc,v retrieving revision 1.367 diff -u -p -r1.367 bootstrap.inc --- includes/bootstrap.inc 26 Mar 2010 17:14:45 -0000 1.367 +++ includes/bootstrap.inc 27 Mar 2010 11:21:31 -0000 @@ -1173,6 +1173,11 @@ function bootstrap_hooks() { * The object to which the elements are appended. * @param $field * The attribute of $obj whose value should be unserialized. + * + * @return + * The object with the contents of the serialized column appended as + * additionally the $field object property will contain the serialized + * array so that it can be re-serialized when saved. */ function drupal_unpack($obj, $field = 'data') { if ($obj->$field && $data = unserialize($obj->$field)) { @@ -1181,6 +1186,7 @@ function drupal_unpack($obj, $field = 'd $obj->$key = $value; } } + $obj->$field = $data; } return $obj; } Index: modules/profile/profile.module =================================================================== RCS file: /cvs/drupal/drupal/modules/profile/profile.module,v retrieving revision 1.288 diff -u -p -r1.288 profile.module --- modules/profile/profile.module 12 Mar 2010 15:56:29 -0000 1.288 +++ modules/profile/profile.module 27 Mar 2010 11:21:32 -0000 @@ -273,8 +273,6 @@ function profile_save_profile(&$edit, $a )) ->fields(array('value' => $edit[$field->name])) ->execute(); - // Mark field as handled (prevents saving to user->data). - $edit[$field->name] = NULL; } } Index: modules/user/user.module =================================================================== RCS file: /cvs/drupal/drupal/modules/user/user.module,v retrieving revision 1.1148 diff -u -p -r1.1148 user.module --- modules/user/user.module 26 Mar 2010 22:24:31 -0000 1.1148 +++ modules/user/user.module 27 Mar 2010 11:21:33 -0000 @@ -334,11 +334,8 @@ function user_load_by_name($name) { * TRUE or omit the $account->uid field. * @param $edit * An array of fields and values to save. For example array('name' - * => 'My name'). Keys that do not belong to columns in the user-related - * tables are added to the a serialized array in the 'data' column - * and will be loaded in the $user->data array by user_load(). - * Setting a field to NULL deletes it from the data column, if you are - * modifying an existing user account. + * => 'My name'). Key / value pairs added to the $edit['data'] will be + * serialized and saved in the {users.data} column. * @param $category * (optional) The category for storing profile information in. * @@ -3391,10 +3388,7 @@ function user_register_submit($form, &$f } $notify = !empty($form_state['values']['notify']); - // The unset below is needed to prevent these form values from being saved as - // user data. form_state_values_clean($form_state); - unset($form_state['values']['notify']); $form_state['values']['pass'] = $pass; $form_state['values']['init'] = $form_state['values']['mail'];