1 user.admin.inc user_admin_role_submit($form, &$form_state)

Form submit handler for the user_admin_role() form.

File

core/modules/user/user.admin.inc, line 713
Admin page callbacks for the User module.

Code

function user_admin_role_submit($form, &$form_state) {
  $role = $form_state['role'];
  $old_role = $role->label;
  $role->label = $form_state['values']['label'];
  user_role_save($role);
  $new_role = $role->label;
  backdrop_set_message(t('The %old_role role has been renamed to %new_role.', array('%old_role' => $old_role, '%new_role' => $new_role)));
  $form_state['redirect'] = 'admin/config/people/roles';
}