function user_admin_roles_order_submit

7.x user.admin.inc user_admin_roles_order_submit($form, &$form_state)

Form submit function. Update the role weights.

1 string reference to 'user_admin_roles_order_submit'
user_admin_roles in drupal-7.x/modules/user/user.admin.inc
Form to re-order roles or add a new one.

File

drupal-7.x/modules/user/user.admin.inc, line 895
Admin page callback file for the user module.

Code

function user_admin_roles_order_submit($form, &$form_state) {
  foreach ($form_state['values']['roles'] as $rid => $role_values) {
    $role = $form['roles'][$rid]['#role'];
    $role->weight = $role_values['weight'];
    user_role_save($role);
  }
  drupal_set_message(t('The role settings have been updated.'));
}