Attach a particular profile2 form to user registration form I have about 3 profile types each with their own registration path. But there's one without a path.  I want to attach this to the main registration form. So that it shows when adding user on the main user add page but not other pages. 

i got it to show with the code below but error when saving the user.

Recoverable fatal error: Argument 1 passed to profile2_save() must be an instance of Profile, instance of ProfileType given,, called in C://....

function short_fixes_form_user_register_form_alter(&amp;$form, &amp;$form_state) {
  global $user;
  $current_user_role = in_array('family',$user-&gt;roles);
  $form['account']['status']['#access'] = FALSE ;
  if($_GET['q'] == 'admin/people/create' &amp;&amp; $current_user_role){
      $form_state['profiles'] = array(
        'family' =&gt; profile2_get_types('family')
      );
      profile2_attach_form($form, $form_state);
    }
}
try this,

$user_register_form = drupal_get_form('user_register_form');
$form_state['profiles'] = array(
'CUSTOM_PROFILE_TYPE_NAME' =&gt; profile2_get_types('CUSTOM_PROFILE_TYPE_NAME')
);
profile2_attach_form($user_register_form, $form_state);
print(drupal_render($user_register_form));