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 modules/
user/ user.admin.inc - Form to re-order roles or add a new one.
File
-
modules/
user/ user.admin.inc, line 1029
Code
function user_admin_role_submit($form, &$form_state) {
$role = (object) $form_state['values'];
if ($form_state['values']['op'] == t('Save role')) {
user_role_save($role);
drupal_set_message(t('The role has been renamed.'));
}
elseif ($form_state['values']['op'] == t('Add role')) {
user_role_save($role);
drupal_set_message(t('The role has been added.'));
}
$form_state['redirect'] = 'admin/people/permissions/roles';
return;
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.