Set order / weight of user profile core fields against user profile custom fields Is it possible to set the order of core fields against custom fields added on user profile page?
I want to bring the status field to the bottom of the list.
I'm trying the code below but without succes:

function MY_MODULE_form_user_profile_form_alter(&amp;$form, &amp;$form_state, $form_id) {
  $form['status']['#weight'] = 100;
}


I want something in the following order for example:


Username (core) 
Password (core)
Custom field 1
Custom field 2
Status
(core)


Thanks in advance
You can just try and set the weight as follows

$form['status']['#weight'] = field_info_max_weight('user', 'user', 'form') + 10;


Have not tried it but I am pretty sure it will work. This will make sure the status will always be the last field.

Also it should be $form['account']['status']['#weight']