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

Form submit function. Create a new user role.

File

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

Code

function user_admin_roles_add_submit($form, &$form_state) {
  $role = (object) array(
    'name' => $form_state['values']['name'],
    'label' => $form_state['values']['label'],
  );
  user_role_save($role);
  backdrop_set_message(t('The %role role has been added.', array('%role' => $role->label)));
  $form_state['redirect'] = 'admin/config/people/roles';
}