function user_admin_permissions_submit

7.x user.admin.inc user_admin_permissions_submit($form, &$form_state)

Save permissions selected on the administer permissions page.

See also

user_admin_permissions()

File

drupal-7.x/modules/user/user.admin.inc, line 753
Admin page callback file for the user module.

Code

function user_admin_permissions_submit($form, &$form_state) {
  foreach ($form_state['values']['role_names'] as $rid => $name) {
    user_role_change_permissions($rid, $form_state['values'][$rid]);
  }

  drupal_set_message(t('The changes have been saved.'));

  // Clear the cached pages and blocks.
  cache_clear_all();
}