Index: modules/content_profile_registration.module
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/content_profile/modules/Attic/content_profile_registration.module,v
retrieving revision 1.1.2.36
diff -u -p -r1.1.2.36 content_profile_registration.module
--- modules/content_profile_registration.module	26 Mar 2010 16:32:28 -0000	1.1.2.36
+++ modules/content_profile_registration.module	13 Jun 2010 13:10:20 -0000
@@ -154,11 +154,19 @@ function content_profile_registration_ad
     }
   }
   
-  // Add in the new form elements into $form.
+  // Add in the new form elements.
   $form += array('#field_info' => array());
   $form['#field_info'] += $node_form['#field_info'];
+
+  // Add #after_build callbacks into $form.
+  $form += array('#after_build' => array());
+  foreach ($node_form['#after_build'] as $function) {
+    if (!in_array($function, $form['#after_build'])) {
+      array_unshift($form['#after_build'], $function);
+    }
+  }
   $form += $form_add;
-  
+
   // Add in further callbacks needed, if not yet done.
   if (!isset($form['#content_profile_weights'])) {
     $form['#submit'][] = 'content_profile_registration_user_register_submit';
