function user_admin_access_form_submit in Drupal 5
Same name and namespace in other branches
- 6 modules/user/user.admin.inc \user_admin_access_form_submit()
Submit callback for user_admin_access_form().
File
- modules/
user/ user.module, line 1755 - Enables the user registration and login system.
Code
function user_admin_access_form_submit($form_id, $form_values) {
if ($form_values['aid']) {
db_query("UPDATE {access} SET mask = '%s', type = '%s', status = '%s' WHERE aid = %d", $form_values['mask'], $form_values['type'], $form_values['status'], $form_values['aid']);
drupal_set_message(t('The access rule has been saved.'));
}
else {
db_query("INSERT INTO {access} (mask, type, status) VALUES ('%s', '%s', %d)", $form_values['mask'], $form_values['type'], $form_values['status']);
drupal_set_message(t('The access rule has been added.'));
}
return 'admin/user/rules';
}