function override_node_options_submit_node in Override Node Options 8
Same name and namespace in other branches
- 5 override_node_options.module \override_node_options_submit_node()
- 6 override_node_options.module \override_node_options_submit_node()
Perform additional node form submission processing normally skipped by core.
@todo Remove when http://drupal.org/node/683630 is fixed.
1 string reference to 'override_node_options_submit_node'
- override_node_options_form_alter in ./
override_node_options.module - Implements hook_form_alter().
File
- ./
override_node_options.module, line 110 - Allow users to override the default publishing options for nodes they can edit without giving them the 'administer nodes' permission.
Code
function override_node_options_submit_node($form, &$form_state) {
// Populate the "authored by" field.
if ($account = user_load_by_name($form_state['values']['name'])) {
$form_state['values']['uid'] = $account->uid;
}
else {
$form_state['values']['uid'] = 0;
}
}