diff --git a/modules/profile/profile.module b/modules/profile/profile.module index 1a95e221b72..c486dda05a5 100644 --- a/modules/profile/profile.module +++ b/modules/profile/profile.module @@ -175,8 +175,9 @@ function profile_user($type, &$edit, &$user, $category = NULL) { case 'register': return profile_form_profile($edit, $user, $category, TRUE); case 'update': + return profile_save_profile($edit, $user, $category); case 'insert': - return profile_save_profile($edit, $user, $category); + return profile_save_profile($edit, $user, $category, TRUE); case 'view': return profile_view_profile($user); case 'form': @@ -538,8 +539,8 @@ function profile_load_profile(&$user) { } } -function profile_save_profile(&$edit, &$user, $category) { - $result = _profile_get_fields($category); +function profile_save_profile(&$edit, &$user, $category, $register = FALSE) { + $result = _profile_get_fields($category, $register); while ($field = db_fetch_object($result)) { if (_profile_field_serialize($field->type)) { $edit[$field->name] = serialize($edit[$field->name]);