You are here

function user_admin_permissions_submit in Drupal 7

Save permissions selected on the administer permissions page.

See also

user_admin_permissions()

File

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();
}