You are here

function user_admin_roles_order_submit in Drupal 7

Form submit function. Update the role weights.

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

File

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.'));
}