Show core fields before Profile2 fields I have fields added to Drupal 7 core users (Config > People > Account settings > Manage fields) which are common to multiple user roles.

I also have fields on a Profile2 profile, which I only want to display for people registering for that role.

I cannot find a way to show the core user registration fields before the Profile2 fields. Tried Manage Fields and Display Suite, but unless you show the Profile2 fields on ALL user registration forms (which of course I don't want to do, as these fields are only relevant to one role on the Drupal site) I can't reorder them.

Been looking for a solution for over a year. Profile2 project on Drupal.org won't answer, Profile2 Reg Path project on Drupal.org won't answer either. Totally stuck, and very surprised that I seem to be the only one with this issue. I have this issue on multiple sites now.
You can use the hook_form_alter() to alter the form and change the weight attribute, if your field is field_username you can use something like this:

function YOUR_MODULE_NAME_form_alter(&amp;$form, &amp;$form_state, $form_id) {

  if($form_id == 'YOUR_FORM_ID') {

    $form['field_username']['#weight'] = -50;
    $form['field_email']['#weight'] = -49;
  }
}