? PATCHES.txt
? openid_profile-996732-1.patch
? openid_profile-996732-2.patch
Index: openid_profile.module
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/openid_profile/openid_profile.module,v
retrieving revision 1.1
diff -u -p -r1.1 openid_profile.module
--- openid_profile.module	3 Nov 2010 03:09:34 -0000	1.1
+++ openid_profile.module	13 Dec 2010 15:07:37 -0000
@@ -293,7 +293,6 @@ function openid_profile_user_profile_sav
     foreach ($mapping as $openid => $field) {
       $short_name = array_pop(explode('/', $openid));
       if (isset($attributes['openid.ax.value.' . $short_name])) {
-
         $field_value = $attributes['openid.ax.value.' . $short_name];
         if (!empty($field)) {
           $user_data[$field] = $field_value;
@@ -310,7 +309,7 @@ function openid_profile_user_profile_sav
       profile_load_profile($account);
       $fields = openid_profile_get_profile_fields();
       foreach ($fields as $field) {
-        $profile_fields[$field['category']][] = $field;
+        $profile_fields[$field['category']][$field['name']] = $field;
       }
     }
 
@@ -321,7 +320,7 @@ function openid_profile_user_profile_sav
       $profile_values = array();
       // check if field really exists
       foreach ($user_data as $k => $v) {
-        if (!isset($account->{$k}) && !isset($fields[$k])) {
+        if (!isset($account->{$k}) && !array_key_exists($k, $fields)) {
           unset($user_data[$k]);
         }
         else {
@@ -331,6 +330,22 @@ function openid_profile_user_profile_sav
       // save user with possibly altered attributes and profile data per category
       user_save($account, $profile_values, $category);
     }
+
+    // Drupal core profile fields that are not present in profile.module
+    $altered = FALSE;
+    $profile_values = array();
+    $core_profile_fields = array('name', 'mail', 'picture', 'timezone', 'language');
+    foreach ($user_data as $key => $value) {
+      if (in_array($key, $core_profile_fields) && in_array($key, $mapping)) {
+        if (isset($value) && !empty($value)) {
+          $altered = TRUE;
+          $profile_values[$key] = $value;
+        }
+      }
+    }
+    if ($altered && count($profile_values)) {
+      user_save($account, $profile_values);
+    }
   }
 }
 
