You are here

function override_node_options_submit_node in Override Node Options 6

Same name and namespace in other branches
  1. 8 override_node_options.module \override_node_options_submit_node()
  2. 5 override_node_options.module \override_node_options_submit_node()

Perform additional node form submission processing normally skipped by core.

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 145
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(array(
    'name' => $form_state['values']['name'],
  ))) {
    $form_state['values']['uid'] = $account->uid;
  }
  else {
    $form_state['values']['uid'] = 0;
  }
}