function user_admin_access_form_submit in Drupal 6
Same name and namespace in other branches
- 5 modules/user/user.module \user_admin_access_form_submit()
Submit callback for user_admin_access_form().
1 string reference to 'user_admin_access_form_submit'
- user_admin_access_form in modules/
user/ user.admin.inc - Form builder; Configure access rules.
File
- modules/
user/ user.admin.inc, line 793 - Admin page callback file for the user module.
Code
function user_admin_access_form_submit($form, &$form_state) {
$edit = $form_state['values'];
if ($edit['aid']) {
db_query("UPDATE {access} SET mask = '%s', type = '%s', status = '%s' WHERE aid = %d", $edit['mask'], $edit['type'], $edit['status'], $edit['aid']);
drupal_set_message(t('The access rule has been saved.'));
}
else {
db_query("INSERT INTO {access} (mask, type, status) VALUES ('%s', '%s', %d)", $edit['mask'], $edit['type'], $edit['status']);
drupal_set_message(t('The access rule has been added.'));
}
$form_state['redirect'] = 'admin/user/rules';
}