function user_admin_role_submit

Form submit handler for the user_admin_role() form.

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

File

drupal/core/modules/user/user.admin.inc, line 994
Admin page callback file for the user module.

Code

function user_admin_role_submit($form, &$form_state) {
  $role = (object) $form_state['values']['role'];
  $status = user_role_save($role);
  if ($status === SAVED_UPDATED) {
    drupal_set_message(t('The role has been renamed.'));
  }
  else {
    drupal_set_message(t('The role has been added.'));
  }
  $form_state['redirect'] = 'admin/people/roles';
}