1 user.admin.inc | user_admin_permissions_submit($form, &$form_state) |
Save permissions selected on the administer permissions page.
See also
File
- core/
modules/ user/ user.admin.inc, line 530 - Admin page callbacks for the User module.
Code
function user_admin_permissions_submit($form, &$form_state) {
foreach ($form_state['values']['roles'] as $role_name => $role) {
user_role_change_permissions($role->name, $form_state['values'][$role->name]);
}
backdrop_set_message(t('The changes have been saved.'));
// Check if a previous search is present and preserve it on redirect.
if (!empty($form_state['values']['search'])) {
$form_state['redirect'] = array(
$_GET['q'],
array('query' => array('search' => $form_state['values']['search'])),
);
}
}